0

我正在尝试将 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 已经有了正确的密钥,并且我已经在苹果注册了我的捆绑 ID。还有什么我想念的吗?我浏览了 5 次文档。

4

1 回答 1

0

Is your App prompting you to enable push notifications when the app starts up? If not it may be a provisioning profile and push certificate issue:

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

Also, be sure to align development credentials with development & vica versa with production.

于 2013-10-16T20:40:28.923 回答