Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-06-2011, 01:18 AM   #1 (permalink)
Registered Member
 
Join Date: May 2011
Posts: 28
Nikke is on a distinguished road
Default Push Notification registration does not work on iPad

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
Nikke is offline   Reply With Quote
Old 10-18-2011, 10:32 PM   #2 (permalink)
ajv
Registered Member
 
Join Date: Jan 2009
Posts: 2
ajv is on a distinguished road
Default did you ever get this solved?

I'm seeing the same problem. Did you discover a solution?
ajv is offline   Reply With Quote
Old 11-24-2011, 06:32 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 1
pochuang is on a distinguished road
Default

I am having the same problem here, but it works well in my previously programs for iOS 4.x.
pochuang is offline   Reply With Quote
Old 02-24-2012, 02:14 AM   #4 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 1
Bassie is on a distinguished road
Default

Was this the problem?:
Quote:
Originally Posted by https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html
iOS Note: If a cellular or Wi-Fi connection is not available, neither the application:didRegisterForRemoteNotificationsWithD eviceToken: method or the application:didFailToRegisterForRemoteNotification sWithError: method is called. For Wi-Fi connections, this sometimes occurs when the device cannot connect with APNs over port 5223. If this happens, the user can move to another Wi-Fi network that isn’t blocking this port or, on an iPhone or iPad, wait until the cellular data service becomes available. In either case, the connection should then succeed and one of the delegation methods is called.
Bassie is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 374
7 members and 367 guests
apatsufas, JackReidy, jeroenkeij, Sami Gh, tim0504, yomo710
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,671
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, JackReidy
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:51 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0