public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) { ParseInstallation installation = ParseInstallation.CurrentInstallation; installation.SetDeviceTokenFromData(deviceToken); installation.SaveAsync(); }
public void Initialize() { // We can only set some values here since we can be sure that Initialize is always called // from main thread. appBuildVersion = Application.version; appName = Application.productName; RegisterDeviceTokenRequest(deviceToken => { if (deviceToken == null) { return; } ParseInstallation installation = ParseInstallation.CurrentInstallation; installation.SetDeviceTokenFromData(deviceToken); // Optimistically assume this will finish. installation.SaveAsync(); }); }