Bug 26582 - RegisterForRemoteNotifications makes the 64-bit apps to close
Summary: RegisterForRemoteNotifications makes the 64-bit apps to close
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: master
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-29 19:29 UTC by flaviup
Modified: 2015-07-15 15:34 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description flaviup 2015-01-29 19:29:03 UTC
After calling UIApplication's RegisterForRemoteNotifications method, the app closes without any warning. This happens only in the 64 bit version.

Registering for remote push notifications: 
		
private void RegisterDeviceForPushNotifications ()
{
  if (UIDevice.CurrentDevice.CheckSystemVersion (8, 0) || UIDevice.CurrentDevice.CheckSystemVersion (8, 1))
  {
    UIUserNotificationType allNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
    UIUserNotificationSettings settingsForTypes = UIUserNotificationSettings.GetSettingsForTypes (allNotificationTypes, null);
    UIApplication.SharedApplication.RegisterUserNotificationSettings (settingsForTypes);
    //UIApplication.SharedApplication.RegisterForRemoteNotifications ();
    return;
  }
  UIRemoteNotificationType allRemoteNotificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound;
  UIApplication.SharedApplication.RegisterForRemoteNotificationTypes (allRemoteNotificationTypes);
}

public override void DidRegisterUserNotificationSettings (UIApplication application, UIUserNotificationSettings notificationSettings)
{
  application.RegisterForRemoteNotifications ();
}
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-01-30 04:47:32 UTC
I pasted this into a sample project, and it worked just fine on my 64-bit device, so some additional condition must be satisfied to this to happen.

Can you attach a complete test solution we can use to reproduce?
Comment 2 flaviup 2015-02-18 18:23:30 UTC
You have to use a push notification enabled provisioning profile. Also, it may happen that if receiving remote push notifications does work, the device token is not received.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-02-19 04:13:08 UTC
I did use a push-notification enabled provisioning profile. Please attach a complete test solution, there must be something else in your setup causing this.
Comment 4 flaviup 2015-07-15 15:34:00 UTC
I've been using Intersoft Crosslight framework. I found this was causing the bug. After reporting the bug they've fixed it.

This issue can be closed.