Issue
I'm getting the exception...
Registration failure: no valid 'aps-environment' entitlement string found for application
...in the FailedToRegisterForRemoteNotifications callback function when I try and register with APNS in my Xamarin iOS app.
Oddly I only get this exception when I compile in Debug mode not Release mode, which means it can't be one of the many, many ways this process might normally fail.
Am I missing some subtlety of how Debug builds work in monotouch?
Solution
While refining the question I found an answer: incremental build is incompatible with APNS.
Incremental build is on by default for debug mode, and there must be something unusual about the app files it creates that prevents the provisioning certificate (which contains the APNS entitlement) being picked up by the device. I suspect it is the same thing that stops apps built in this way launching standalone.
Answered By - Rupert Rawnsley
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.