title: Development Apple Push Notifications aren't working on iOS; didRegisterForRemoteNotificationsWithDeviceToken not called
body: <p>I have an app which works on iOS 7 and later. Apple Push Notifications were working in development mode yesterday, but not now.</p>
  
  <p>I am registering for push notifications like this:</p>
  
  <pre><code>if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)])
      {
          // iOS 8 Notifications
          [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
  
          //enabled =  [application isRegisteredForRemoteNotifications];
      }
      else
      {
          // iOS &lt; 8 Notifications
          [application registerForRemoteNotificationTypes:
           (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)];
          //UIRemoteNotificationType types = [application enabledRemoteNotificationTypes];
          //enabled = types &amp; UIRemoteNotificationTypeAlert;
  
      }
  
  // Delegate methods are
  
  - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
  {
      //register to receive notifications
  
      [application registerForRemoteNotifications];
  }
  
  - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
  {
  
      NSString *newToken = [deviceToken description];
  
      newToken = [newToken stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"&lt;&gt;"]];
  
      newToken = [newToken stringByReplacingOccurrencesOfString:@" " withString:@""];
  
      self.myDeviceToken = newToken;
      [CLServerDataManager setDeviceToken:newToken];
  
  }
  
  - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
  {
  
  #if TARGET_IPHONE_SIMULATOR
      NSLog(@"Failed to get token, error: %@", error);
      [CLServerDataManager setDeviceToken:@"dummy"];
      self.myDeviceToken = @"dummy";
  #endif
  
  }
  </code></pre>
  
  <p>And push notifications were working till last day. Certificates were made according to the www.raywenderlich.com site.</p>
  
  <p>But now I have noticed that methods:</p>
  
  <pre><code>didRegisterForRemoteNotificationsWithDeviceToken:
  didFailToRegisterForRemoteNotificationsWithError
  </code></pre>
  
  <p>are not being called and I am **not getting the device token.</p>
  
  <p>I am trying this code as well:</p>
  
  <pre><code>NSUUID *identifierForVendor = [[UIDevice currentDevice] identifierForVendor];
  NSString *deviceId = [identifierForVendor UUIDString];
  </code></pre>
  
  <p>... and both are not working.</p>
  
  <p>Please let me know what could be the issue. Thanks in advance.</p>