Device is Registered for notification but did not get device token
<p>here my code </p>

<pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if ([[[UIDevice currentDevice] systemVersion] floatValue] &gt;= 8.0)
    {

        [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes: (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound) categories:nil]];
        [[UIApplication sharedApplication] registerForRemoteNotifications];
    }
    else
    {
        [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
         (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
    }

    [application registerForRemoteNotifications];

       return YES;

}
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
    //register to receive notifications
    NSLog(@"device registered...");
    [application registerForRemoteNotifications];

}
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
    //    [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
    NSString *deviceID = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"&lt;&gt;"]];
    deviceID = [deviceID stringByReplacingOccurrencesOfString:@" " withString:@""];
      str_DeviceToken = deviceID;
    NSLog(@"device token is %@",str_DeviceToken);
}
</code></pre>

<p>I neither get any device token error nor get device token when i run this code into device.</p>

<p>I spent  a day behind find the issue  please help to get device token.</p>

<p>Thanks in advance</p>