Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS Push Notification error with UrbanAirship
    primarykey
    data
    text
    <p>I've finally got push notifications working from UrbanAirship. But now I have a problem, searched here and can't find a solution.</p> <p>When the app is running and I get a notification, clicking the notification takes me into the app and all is well.</p> <p>When I kill the app and I get a notification, the app dies with SIGKILL.</p> <p>Here is the log: <a href="http://pastebin.com/yRuBbZx8" rel="nofollow">log</a></p> <p>OK, here is my appdelegate.m:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //Init Airship launch options NSLog(@"Before NSMutableDictionary"); NSMutableDictionary *takeOffOptions = [[NSMutableDictionary alloc] init]; [takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey]; // Create Airship singleton that's used to talk to Urban Airship servers. // Please populate AirshipConfig.plist with your info from http://go.urbanairship.com NSLog(@"Before takeOff"); [UAirship takeOff:takeOffOptions]; // Register for notifications NSLog(@"Before UIApplication"); [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; NSLog(@"Before reset badge"); //reset badge application.applicationIconBadgeNumber = 0; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil]; self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; return YES; } -(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { NSLog(@"didRegisterForRemoteNotifications"); [[UAirship shared] registerDeviceToken:deviceToken]; } -(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { NSString *str = [NSString stringWithFormat: @"Error: %@", error]; NSLog(@"Error:%@",str); } </code></pre> <p>Any help greatly appreciated before this Mac Mini goes through the window :-)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload