didFinishLaunchingWithOptions not called
Posted
by
user1256477
on Stack Overflow
See other posts from Stack Overflow
or by user1256477
Published on 2012-12-14T10:57:10Z
Indexed on
2012/12/14
11:03 UTC
Read the original article
Hit count: 137
I'm having trouble enabling push notifications.
with this code I try to enable the notification:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationType)(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
return YES;
}
It doesnt work, so I added a breakpoint in the line
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationType)(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
But it seems this part of the code is never execute.
why is this not working?
© Stack Overflow or respective owner