Urban Airship:使用Phonegap推送通知不起作用

时间:2014-06-26 14:57:34

标签: ios cordova

你能告诉我我错过了什么

我正在使用手机差距开发混合APP。

我的config.xml看起来像

<preference name=“com.urbanairship.developmentappkey” value=“*******RhKiHsW9pASskA ” />
<preference name=“com.urbanairship.developmentappsecret” value=“****2QDjOZJM1g ” />
<preference name=“com.urbanairship.inproduction” value=“No” />

当我使用XCODE构建应用程序时,然后在控制台中记录了以下信息

1.278017ms
2014-06-26 20:09:57.793 Mercer Select[745:60b] [W] -[UAConfig validate] [Line 152] Development App Key is not valid.
2014-06-26 20:09:57.794 Mercer Select[745:60b] [W] -[UAConfig validate] [Line 156] Development App Secret is not valid.
2014-06-26 20:09:57.795 Mercer Select[745:60b] [W] -[UAConfig validate] [Line 160] Production App Key is not valid.
2014-06-26 20:09:57.796 Mercer Select[745:60b] [W] -[UAConfig validate] [Line 164] Production App Secret is not valid.
2014-06-26 20:09:57.797 Mercer Select[745:60b] [E] -[UAConfig validate] [Line 168] Current App Key (***RhKiHsW9pASskA ) is not valid.
2014-06-26 20:09:57.798 Mercer Select[745:60b] [E] -[UAConfig validate] [Line 173] Current App Secret (****2Q_DjOZJM1g ) is not valid.
2014-06-26 20:09:57.799 Mercer Select[745:60b] [E] +[UAirship executeUnsafeTakeOff:] [Line 141] The AirshipConfig.plist file is missing and no application credentials were specified at runtime.

我的JS代码看起来像:我在device.ready event

中编写代码
       document.addEventListener("urbanairship.registration", function (event) {
            alert("Inside");
            if (event.error) {
                alert('there was an error registering for push notifications');
            } else {
                alert("Registered with ID: " + event.pushID);
            }
        }, false);

        document.addEventListener("urbanairship.push", function (event) {
            alert("Incoming push: " + event.message);
        }, false);

0 个答案:

没有答案