1
我從UrbanAirship.com複製了豐富的推送樣本。 並在應用委託didFinishLaunchingWithOptions中初始化飛艇。適用於iOS的Urban Airship Rich推送通知,用戶未註冊
//Init Airship launch options
NSMutableDictionary *takeOffOptions = [[[NSMutableDictionary alloc] init] autorelease];
[takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey];
NSMutableDictionary *analyticsOptions = [[[NSMutableDictionary alloc] init] autorelease];
[analyticsOptions setValue:@"NO" forKey:UAAnalyticsOptionsLoggingKey];
[takeOffOptions setValue:analyticsOptions forKey:UAirshipTakeOffOptionsAnalyticsKey];
添加遠程通知觀察員和註冊設備令牌。 但是在運行應用程序後,我無法在UrbanAirship.com的我的應用程序詳細信息頁面上找到任何富推送用戶。 所以我無法測試富推送通知。 有什麼問題?我期待着回答。
(以下是日誌)
-[UAAnalytics initWithOptions:] [Line 216] Analytics logging not enabled
MyApp[3285:707] -[UAUser migrateUser] [Line 187] Migrating User Info: (null)
MyApp[3285:707] -[UAUser loadUser] [Line 268] User Info: (null)
MyApp[3285:707] -[UAInboxMessageList loadSavedMessages] [Line 103] before retrieve saved messages: (null)
MyApp[3285:707] -[UAInboxMessageList loadSavedMessages] [Line 109] after retrieve saved messages: (
)
...
MyApp[3285:707] applicationDidBecomeActive
MyApp[3285:707] -[UAUser listenForDeviceTokenReg] [Line 964] ListenForDeviceTokenReg
MyApp[3285:707] -[UAInboxMessageList requestWentWrong:] [Line 310] Inbox Message List Request Failed: Authentication needed
MyApp[3285:707] -[UAirship setDeviceToken:] [Line 306] Device token: daa75616a2f9b2b2c5e8e42fe6236cae031be082a3e3ddf1af6b00d8ad444444
MyApp[3285:707] -[UAUser observeValueForKeyPath:ofObject:change:context:] [Line 996] KVO device token modified
MyApp[3285:707] -[UAUser updateDefaultDeviceToken] [Line 1011] Updating device token
MyApp[3285:707] -[UAUser updateDefaultDeviceToken] [Line 1016] Skipping device token update: no token, already up to date, or user is being updated.
MyApp[3285:707] -[UAUser retrieveRequestFailed:] [Line 935] User retrieval failed: 401:Authorization Required
MyApp[3285:707] -[UAirship registerDeviceTokenSucceeded:] [Line 334] Device token registered on Urban Airship successfully.
只有我重新創建了UrbanAhiphip上的應用程序。 之後,它的工作。 – ttotto 2012-03-31 04:27:00