title: Apple Push Notification-Unable to callback didRegisterForRemoteNotificationsWithDeviceToken
body: <p>I have been simply trying to get deviceToken from my iPhone application using Apple Push Notification Service.
  I don't have any implementation on server side for the time being.
  I have created APP Id, got SSL certificate, Provision Profile with APN and calling </p>
  
  <pre><code>- (void)applicationDidFinishLaunching:(UIApplication *)application {
  //view init and add sub view to window
      [[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound];
  }
  </code></pre>
  
  <p>method. 
  When I execute the application it pop ups action box to allow Push Notification (means my request for APN registration is working) but my callback is not executed. Neither <strong>didRegisterForRemoteNotificationsWithDeviceToken</strong> nor <strong>didFailToRegisterForRemoteNotificationsWithError</strong> is called? can anybody help me to resolve the issue? Following are my callbacs for reference.</p>
  
  <pre><code>    - (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err {
  
              UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"APNClient" message:@"Entered into Error Method" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
              [myAlert show];
              [myAlert release];
              NSLog(@"Error in registration. Error: %@", err);
  
          }
  - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
      UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"APNClient" message:@"Got the deviceToken..!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [myAlert show];
      [myAlert release];        
  }
  </code></pre>