Not able to send push notification to iOS devices through MFP Server V8 Console

六眼飞鱼酱① 提交于 2019-12-06 19:24:27

No devices found. It means your app is not register for push notification.

You have to be sure that your app is able to register for push notification.

In case of Apple Push Notification Service (APNS) , Select following option carefully in MFP Console.

1. you have to choose Production or Sandbox ?
2. Add PKCS (.p12) file with correct passowrd.

Sample Code:

initialize app for push notification

        MFPPush.initialize (
        function(successResponse) {
            alert("Push Notification Successfully intialized");
            MFPPush.registerNotificationsCallback(notificationReceived);
        },
        function(failureResponse) {
            alert("Failed to initialize");
        }
    );

Check device is Supported for push notification

        MFPPush.isPushSupported (
        function(successResponse) {
            alert("Device is Push Supported");
        },
        function(failureResponse) {
            alert("Failed to get push support status");
        }
    );

register app for push notification

        MFPPush.registerDevice( null,
        function(successResponse) {
                alert("Device Successfully registered");
        },
        function(failureResponse) {
            alert("Failed to register");
        }
    );
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!