Setting Aliases and Named Users on app open in iOS app

If you want to set an Alias or Named User immediately on app open instead of using a login process, but find Aliases or Named Users aren't propagating to your test devices on the dashboard right away:

  • Give the Alias or Named User a few minutes to show up on your Urban Airship dashboard. There may be registration delays in our system.
  • To help with debugging, set your log level to 5. This will allow you to see all the data that is being sent to our system. For a development build, add the following to your airshipConfig.plist:

  • ​ If you find that it is still not setting during the first run, try disabling push and then enabling it after you've set up the Alias or Named User. In your app delegate under didFinishLaunchingWithOptions, add the following code:

    [UAirship takeOff];
    //Don't enable push right away
    [UAPush setDefaultPushEnabledValue:NO];
    //Create alias
    NSString *alias = @"testalias";
    [[UAPush shared] setAlias:alias];
    NSLog(@"Setting alias");
    [[UAPush shared] updateRegistration];
    //Finally, enable push
    NSLog(@"About to start enabling push");
    [[UAPush shared] setPushEnabled:YES];

 Related Content:

Was this article helpful?
0 out of 0 found this helpful
Submit a request