ios推送通知不适用于城市飞艇

时间:2014-03-31 08:23:48

标签: ios cordova plugins urbanairship.com

我正在尝试在iOS PhoneGap应用中添加推送通知。我正在使用命令行界面(CLI)创建PhoneGap应用程序并添加城市飞艇插件。我正在通过此链接https://github.com/urbanairship/phonegap-ua-push获取帮助。我从此位置config.xml

更改了project folder/platforms/ios/Project_name/config.xml

下面是我的日志

2014-03-31 14:03:12.435 ListCreator[3129:60b] Multi-tasking -> Device: YES, App: YES
2014-03-31 14:03:12.481 ListCreator[3129:60b] Unlimited access to network resources
2014-03-31 14:03:12.605 ListCreator[3129:60b] [W] -[UAConfig validate] [Line 157] Production App Key is not valid.
2014-03-31 14:03:12.607 ListCreator[3129:60b] [W] -[UAConfig validate] [Line 161] Production App Secret is not valid.
2014-03-31 14:03:12.609 ListCreator[3129:60b] [I] +[UAirship executeUnsafeTakeOff:] [Line 145] App Key: xxxxxxxxREqtRFvTKQrQIQ
2014-03-31 14:03:12.611 ListCreator[3129:60b] [I] +[UAirship executeUnsafeTakeOff:] [Line 146] App Secret: xxxxxxxqg3C8DCEiWvA
2014-03-31 14:03:12.613 ListCreator[3129:60b] [I] +[UAirship executeUnsafeTakeOff:] [Line 147] Server: https://device-api.urbanairship.com
2014-03-31 14:03:12.617 ListCreator[3129:60b] [D] -[UAirship configureUserAgent] [Line 311] Setting User-Agent for UA requests to ListCreator 1.0 (iPod touch; iPhone OS 7.1; UALib 3.0.3; gDcwCI_1REqtRFvTKQrQIQ; en_US)
2014-03-31 14:03:12.627 ListCreator[3129:60b] [D] void PrintReachabilityFlags(SCNetworkReachabilityFlags, const char *) [Line 79] Reachability Flag Status: -R -----l- networkStatusForFlags
2014-03-31 14:03:12.635 ListCreator[3129:60b] [I] +[UAirship executeUnsafeTakeOff:] [Line 190] Registering UAURLProtocol
2014-03-31 14:03:12.649 ListCreator[3129:60b] [D] -[UALocationService startReportingSignificantLocationChanges] [Line 311] Attempt to start significant change service
2014-03-31 14:03:12.676 ListCreator[3129:60b] [D] -[UALocationService startReportingLocationWithProvider:] [Line 480] Location service not authorized or not enabled
2014-03-31 14:03:12.678 ListCreator[3129:60b] [CDVTimer][pushnotificationplugin] 80.036998ms
2014-03-31 14:03:12.681 ListCreator[3129:60b] [CDVTimer][TotalPluginStartup] 82.762003ms
2014-03-31 14:03:13.416 ListCreator[3129:60b] [D] -[UAStandardLocationProvider locationManager:didChangeAuthorizationStatus:] [Line 54] Standard location authorization changed 0
2014-03-31 14:03:13.417 ListCreator[3129:60b] [D] -[UALocationService locationProvider:withLocationManager:didChangeAuthorizationStatus:] [Line 224] Location service did change authorization status 0
2014-03-31 14:03:13.419 ListCreator[3129:60b] [D] -[UASignificantChangeProvider locationManager:didChangeAuthorizationStatus:] [Line 51] Significant change did change authorization status 0
2014-03-31 14:03:13.421 ListCreator[3129:60b] [D] -[UALocationService locationProvider:withLocationManager:didChangeAuthorizationStatus:] [Line 224] Location service did change authorization status 0
2014-03-31 14:03:14.456 ListCreator[3129:60b] Resetting plugins due to page load.
2014-03-31 14:03:15.043 ListCreator[3129:60b] Finished load of: file:///var/mobile/Applications/1CF70A66-2E2E-41DB-8357-F650DA7B6615/ListCreator.app/www/index.html
2014-03-31 14:03:15.482 ListCreator[3129:60b] THREAD WARNING: ['Notification'] took '158.023926' ms. Plugin should use a background thread.
2014-03-31 14:03:27.645 ListCreator[3129:1403] [D] +[UAKeychainUtils getDeviceID] [Line 238] Retrieved device id info from keychain.
2014-03-31 14:03:27.646 ListCreator[3129:1403] [D] +[UAKeychainUtils getDeviceID] [Line 245] Loaded Device ID: C62AC604-20BA-44C7-BB6D-00E593B491E0
2014-03-31 14:03:27.648 ListCreator[3129:1403] [D] +[UAKeychainUtils getDeviceID] [Line 246] Loaded Model Name: iPod5,1
2014-03-31 14:03:28.513 ListCreator[3129:60b] [D] __39-[UAAnalytics sendOperationWithEvents:]_block_invoke [Line 622] Analytics data sent successfully. Status: 200

在城市飞艇网站上,我可以看到应用程序开放时间为5。这是屏幕截图http://nevadasoftbd.com/urban-airship.png

无法发送推送,也无法登录应用。

提前致谢

1 个答案:

答案 0 :(得分:0)

您需要验证自己的Production App KeyProduction App Secret

2014-03-31 14:03:12.605 ListCreator[3129:60b] [W] -[UAConfig validate] [Line 157] Production App Key is not valid.
2014-03-31 14:03:12.607 ListCreator[3129:60b] [W] -[UAConfig validate] [Line 161] Production App Secret is not valid.

此外,您需要确认您正在查看正确的应用程序'在Urban Airship中,可以是Production应用程序,也可以是Developer app。