City airship can't get rich push

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?

+4
source share
1 answer

The rich push is pretty poorly documented, in my opinion. I myself was at an impasse and contacted UA support. They pointed me to inboxSample here: https://github.com/urbanairship/ios-library

Learning this example is a great start to understanding how to implement Rich Push on the iOS side.

I also found reference documents for UA classes here: http://docs.urbanairship.com/ios-lib/

Go through each of the UAInbox * classes. Documents are in order (not large).

I wish they had a review document on how to implement Rich Push in the same way that they explain how to implement push notifications. I would save a lot of time for many developers, I'm sure ...

Judd

0
source

All Articles