我在城市飞艇方面遇到问题,特别是为富有推特的用户注册。我在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正试图发送这些富有的推动力。任何人都知道为什么它会迷路?