Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
somewhere within the application the app crashes after starting the debugger for the device. Even if the code isn't called.
I added that code to a test project, and it doesn't crash for me.
Can you attach a complete test project I can try out?
This bug was targeted for a past milestone, moving to the next non-hotfix active milestone.
I have the same issue. Testing with Xamarin.iOS 184.108.40.206
It seems that the problem is in public override void RegisteredForRemoteNotifications ( UIApplication application, NSData deviceToken)
deviceToken System.Exception: Could not initialize an instance of the type 'MonoTouch.Foundation.NSString': the native 'initWithDa…
Ilya, it seems you're using deviceToken.ToString () , which is not always guaranteed to return the correct result . You need to fetch deviceToken as binary data (the easiest is probably to use deviceToken.AsStream () and read binary data from it).
 You probably got your code from here: http://docs.xamarin.com/guides/cross-platform/application_fundamentals/notifications/ios/remote_notifications_in_ios/, which is wrong (we know about this and a fix is in progress).
 An NSData does not necessarily contain data that can be converted to a string (and for this case Apple's documentation  explicitly states that deviceToken is 32 bytes of binary data).
Thank you for the info. It helped.
Some info of getting readable device token can be found here
BAsed on comment #5 and comment #6, I am closing this bug.