Hey there.
I have troubles getting the deviceToken from my development iPad. It is working on and iPhone4 and iPhone 3GS though.
In case I deploy on the iPad, it is registering the Push Notifications successfully as I can find my App with my settings in the Notifications Preferences of the device.
Problem: It
DOES NOT jump in one of the functions:
didRegisterForRemoteNotificationsWithDeviceToken or
didFailToRegisterForRemoteNotificationsWithError.
My code is still pretty simple:
Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"About to register for PushNotifications");
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
NSLog(@"Registration finished..");
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
NSLog(@"deviceToken: %@", deviceToken);
}
- (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
{
NSLog(@"Failed to get deviceToken, error: %@", error);
}
iPad and iPhone 3GS are running iOS4, iPhone4 is running iOS5 beta.
Hope you guys have a simple answer for me as I really don't know where my problem is.
Cheers, Nik