public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
        {
            ParseInstallation installation = ParseInstallation.CurrentInstallation;

            installation.SetDeviceTokenFromData(deviceToken);

            installation.SaveAsync();
        }
示例#2
0
        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();
            });
        }