Urbanairship没有开机

时间:2013-10-08 18:16:54

标签: ios push-notification urbanairship.com

我正在尝试将UrbanAirship集成到我的应用中,并且一直遇到以下错误:

2013-10-08 11:07:29.381 iostestapp[1949:60b] [I] +[UAirship executeUnsafeTakeOff:] [Line 143] App Key: <key>
2013-10-08 11:07:29.383 iostestapp[1949:60b] [I] +[UAirship executeUnsafeTakeOff:] [Line 144] App Secret: <secret>
2013-10-08 11:07:29.385 iostestapp[1949:60b] [I] +[UAirship executeUnsafeTakeOff:] [Line 145] Server: https://device-api.urbanairship.com
2013-10-08 11:07:29.388 iostestapp[1949:60b] [D] -[UAirship configureUserAgent] [Line 297] Setting User-Agent for UA requests to iostestapp 1.0 (iPhone; iPhone OS 7.0.2; UALib 3.0.0; <key>; en_US)
2013-10-08 11:07:29.404 iostestapp[1949:60b] [D] void PrintReachabilityFlags(SCNetworkReachabilityFlags, const char *) [Line 79] Reachability Flag Status: -R -----l- networkStatusForFlags
2013-10-08 11:07:29.453 iostestapp[1949:60b] [E] -[UAAutoAppDelegate application:didFailToRegisterForRemoteNotificationsWithError:] [Line 43] Failed To Register For Remote Notifications With Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x16eab540 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
2013-10-08 11:07:44.418 iostestapp[1949:430b] [D] +[UAKeychainUtils getDeviceID] [Line 227] Retrieved device id info from keychain.
2013-10-08 11:07:44.419 iostestapp[1949:430b] [D] +[UAKeychainUtils getDeviceID] [Line 234] Loaded Device ID: 707C3963-D503-450F-B8DA-7499E18CB14D
2013-10-08 11:07:44.421 iostestapp[1949:430b] [D] +[UAKeychainUtils getDeviceID] [Line 235] Loaded Model Name: iPhone5,1
2013-10-08 11:07:44.824 iostestapp[1949:60b] [D] __39-[UAAnalytics sendOperationWithEvents:]_block_invoke [Line 622] Analytics data sent successfully. Status: 200

这是我为它写的代码:

UAConfig * config = [UAConfig defaultConfig];

   [UAirship takeOff:config];

   [UAPush shared].notificationTypes = (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeNewsstandContentAvailability);
   [[UAPush shared] setPushEnabled:YES];

.plist已经有正确的密钥,我已经用apple注册了我的捆绑ID。我还缺少什么?我经历了5次这样的文档。

1 个答案:

答案 0 :(得分:0)

应用启动时,您的应用是否会提示您启用推送通知?如果不是,它可能是配置文件和推送证书问题:

http://docs.urbanairship.com/build/ios.html#production-vs-development-apps-in-urban-airship

此外,请务必将开发凭据与开发和优化保持一致。与生产相反。