Exemple #1
0
    private void OnCloudIdentityChanged(NSNotification obj)
    {
        Debug.Log("OnCloudIdentityChanged");

        // In order to see if the current iCloud identity has changed
        // Check the current token against the last one
        // Tokens are opaque (no public properties). All you can do is compare them

        var NextToken = NSFileManager.DefaultManager().UbiquityIdentityToken;

        if (Token == NextToken)
        {
            Debug.Log("The cloud identity has not changed");
        }
        else
        {
            Debug.Log("The cloud identity has chnaged");
        }

        // If you wanted to unsubscribe from the notification you would do so like..
        CKContainer.RemoveAccountChangedNotificationObserver(Unsubscriber);
    }