I have another question (probably lame one).
So I have a simple code that is supposed to register for APNS. I have all certificates and profiles set up on my Apple account. So in AppDelegate.cs in FinishedLaunching method I added:
UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge);<br />
and I also added two methods:
public override void RegisteredForRemoteNotifications (UIApplication application, NSData deviceToken)<br />
DeviceTokenHolder.deviceToken = deviceToken.ToString();<br />
DeviceTokenHolder.registered = true;<br />
new UIAlertView ("APNS", "Registered. Token: " + deviceToken.ToString(), null, "OK", null).Show();<br />
<p>public override void FailedToRegisterForRemoteNotifications (UIApplication application, NSError error)<br />
new UIAlertView ("APNS", "Failed register", null, "OK", null).Show();<br />
THe problem is that when I launch the app on my iPhone I never reach the RegisteredForRemoteNotifications method nor FailedToRegisterForRemoteNotifications (I set up breakpoints). When I launch the app on iPhone simulator FailedToRegisterForRemoteNotifications is of course invoked.
A same code that uses the same certificates, but written in Objective C in Xcode, works like a charm and I get token immediately.
I am using Xamarin trial license.