Question: I Have implemented following code but not getting the Device Token?

```
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    NSLog(@"deviceToken: %@", deviceToken);
}

```

Answer: 
Are you trying inside of the simulator ? 
Push notification and related appdelagate events doesn't work on simulator. 

If you are using the device, 
Make sure that bundle identifier of your application must be same with your push ssl bundle identitifier which you defined during creating AppID on iphone privisioning protal.
For registering your device with APNs, you will first have to call

```
    [[UIApplication sharedApplication]
 registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

```

this is usually written in your AppDelegate (in didFinishLaunching ).
Then make sure you have implemented the 

```
didRegisterForRemoteNotificationsWithDeviceToken 

```

which provides you with the device token and

```
didFailToRegisterForRemoteNotificationsWithError

```

which gives you the error your code might have encountered.