I'm having problems with Urban Airship, especially for registering users for Rich Push. I have the following code in 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]; }
This allows my code to register a device under device tokens, as well as automatically generate a user for Rich Push. However, the alias and device token are not transferred to the Rich Push user, and I suspect that he does not allow the UA to send rich push to my device.
What am I missing? I was browsing documents for iOS push and had the same code. Any help would be appreciated!
Update:
So, I created the user by clicking on the endpoint /api/user API and clicking on the / device _token alias. However, my device still does not get a rich boost. I went to /api/user/user_id and confirmed this icon> 0, so Urban Airship is trying to send these saturated jolts. Does anyone know why he got lost?
source share