我在城市飛艇方面遇到問題,特別是爲富有推特的用戶註冊。我在AppDelegate
城市飛艇無法獲得豐富的推動力
//Create Airship options dictionary and add the required UIApplication launchOptions
NSMutableDictionary *takeOffOptions = [NSMutableDictionary dictionary];
[takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey];
[UAirship takeOff:takeOffOptions];
[[UAPush shared] resetBadge];
// Register for remote notfications with the UA Library. This call is required.
[[UAPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)];
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
// Updates the device token and registers the token with UA.
NSString *myAlias = @"Your Alias";
[UAPush shared].alias = myAlias;
[[UAPush shared] registerDeviceToken:deviceToken];
}
這使我的代碼進行登記的設備下的裝置憑證,以及自動生成豐富的推送用戶下面的代碼。但是,別名和設備令牌不會傳遞到Rich Push用戶,我懷疑這不會讓UA將豐富的下推送到我的設備。
我錯過了什麼?我查看了iOS推送的文檔並使用了相同的代碼。任何幫助,將不勝感激!
更新:
所以我創建了一個用戶擊中/api/user API
端點和暴力破解別名/ device_token。但是,我的設備仍然沒有獲得豐富的推動力。我去了/api/user/user_id
並驗證了徽章> 0,所以Urban Airship正試圖發送這些富有的推動力。任何人都知道爲什麼它會迷路?