title: didRegisterForRemoteNotificationsWithDeviceToken never called on specific device
body: <p>First of all, I am on iPhone 6 Plus/iOS 8.1 and I've tried everything here: <a href="https://stackoverflow.com/questions/4086599/why-didregisterforremotenotificationswithdevicetoken-is-not-called">why didRegisterForRemoteNotificationsWithDeviceToken is not called</a></p>
  
  <p>Still no avail. To summarize:</p>
  
  <ul>
  <li>I've checked my bundle identifier matches the one in provisioning profile/development portal</li>
  <li>I've created a new development push APNS certificate</li>
  <li>I've created a new development certificate</li>
  <li>I've created a new provisioning profile for that development certificate</li>
  <li>I've downloaded both the certificate and provisioning profile, and obviously, double clicked them to install</li>
  <li>I've verified that everything is right on Developer Portal: all certificates and provisioning profiles valid, push enabled and configured with my new APNS certificate</li>
  <li>I've uploaded my new APNS certificate to Parse (it's irrelevant at this step, but anyway) as I'm using Parse for my backend</li>
  <li>I've made sure that I'm using the correct certificate/provisioning profile pair at Xcode to codesign</li>
  <li>I've checked Notifications settings in case my app is not allowed to receive pushes, it's not there</li>
  <li>I've tried setting date manually to tomorrow and tried re-installing the app</li>
  <li>I've deleted the app from my device</li>
  <li>I've deleted any related provisioning profiles from my device</li>
  <li>I've restarted my device multiple times</li>
  </ul>
  
  <p>In <code>application:didFinishLaunchingWithOptions:</code> I call:</p>
  
  <pre><code>if([application respondsToSelector:@selector(registerUserNotificationSettings:)]){
          //iOS 8+
          [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
      }else{
          //pre-iOS 8
          [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
           (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
      }
  </code></pre>
  
  <p>In <code>application:didRegisterUserNotificationSettings:</code> I call:</p>
  
  <pre><code>[application registerForRemoteNotifications];
  </code></pre>
  
  <p>I've checked it with a breakpoint, it DOES get called. I've also implemented two methods:</p>
  
  <p><code>application:didRegisterForRemoteNotificationsWithDeviceToken:</code></p>
  
  <p>and</p>
  
  <p><code>application:didFailToRegisterForRemoteNotificationsWithError:</code></p>
  
  <p>However, neither of them is called. Not an error, nothing. No error at the console either. (I've had an issue about entitlements earlier today, but creating new certificate/provisioning profile solved that)</p>
  
  <p>What could be the issue?</p>
  
  <p><strong>UPDATE:</strong> Here is something. In <code>application:didRegisterUserNotificationSettings:</code> I've checked the notification settings and here is what I've got:</p>
  
  <pre><code>(lldb) po notificationSettings
  &lt;UIUserNotificationSettings: 0x170031cc0; types: (none);&gt;
  </code></pre>
  
  <p><strong>UPDATE 2:</strong> I've checked notifications again, and found out that now my app is added to the notifications in Settings, it's enabled, given permissions. But still, the handler is not called.
  Types are none. I'm 99% sure it's related to the problem.</p>
  
  <p><strong>UPDATE 3:</strong> I've tested on another device (iPod touch, iOS 8.1), and I've got no problems there. It immediately called the <code>application:didRegisterForRemoteNotificationsWithDeviceToken:</code> method with its token. The problem is specific to my iPhone.</p>