title: Device token getting Nil
body: <p>I have a strange issue, Some of my users are returning blank (or null) device tokens for <code>Apple Push Notification</code>. It happening only some of user's only not for all user's, </p>
  
  <p><em>Here's my code,</em></p>
  
  <pre><code>- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  
     #if !TARGET_IPHONE_SIMULATOR
  
         [_globalKRData setPreferences:deviceToken withKey:kPushToken]; // Preferences 
  
         PFInstallation *currentInstallation = [PFInstallation currentInstallation];
         [currentInstallation setDeviceTokenFromData:deviceToken];
  currentInstallation.channels = @[@"global"];
         [currentInstallation saveInBackground];
  
      #endif
  
  }
  </code></pre>
  
  <p>Is it possible if device is <code>Jail break</code> that's why i getting nil device token ?</p>
  
  <p><strong>Update</strong> </p>
  
  <p>For example First time user allowing push notification and it works properly,</p>
  
  <p>Now user go to setting and disable the notification from setting's</p>
  
  <p><a href="https://i.stack.imgur.com/Q4hfQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Q4hfQ.png" alt="Disable notification"></a></p>
  
  <p>Then after it i will not get device token <strong>that was fine but problem is</strong> now user uninstall the app,</p>
  
  <p>Then after Download the app again then after <code>didRegisterForRemoteNotificationsWithDeviceToken</code> not called so i getting nil device token and when i check setting it will showing notification on </p>