I copied rich push sample from the UrbanAirship.com.
And initialize the airship in the app delegate didFinishLaunchingWithOptions.
//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];
add remote notification observer and register device token.
But after the run the app, I cannot find any rich push user on the my app detail page of the UrbanAirship.com.
So I cannot test rich push notification.
What’s wrong? I am looking forward answer.
(Following are log)
-[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.
I had the same problem. UrbanAirship’s answer is here – As a one time solution add
DELETE_KEYCHAIN_CREDENTIALS = YESthe the configuration file. I build my UA config file, I do not use the AirshipConfig.plist, so I added a switch to the settings to allow this line to be added as needed.Here is the code I use to build the settings array:
After running this, my log file shows:
Showing a new user was created. I am using the rich text inbox based on alias and tags. So the username does not effect my application.
Did I miss anything?