Re: NSUbiquityIdentityDidChangeNotification
Re: NSUbiquityIdentityDidChangeNotification
- Subject: Re: NSUbiquityIdentityDidChangeNotification
- From: Roland King <email@hidden>
- Date: Sat, 30 Mar 2013 12:34:31 +0800
Hmm - only says that in the iCloud Fundamentals documentation, not in the actual description of the notification, which makes me a tad suspicious.
When you turn off documents and data but leave iCloud signed in, does the ubiquity token actually return nil? If so, but you don't get the notification, it's a bug and worth reporting. If not, the documentation is lying.
On 30 Mar, 2013, at 12:25 PM, koko <email@hidden> wrote:
> The following is from the documentation.
>
> If a user signs out of iCloud, such as by turning off Documents & Data in Settings, the ubiquityIdentityToken method returns nil. To enable your app to detect when a user signs out and signs back in, register for changes in iCloud account availability. In your app’s launch sequence, add an app object as an observer of the NSUbiquityIdentityDidChangeNotification notification, using code such as that shown in Listing 1-3.
>
> Is this documentation incorrect?
>
> -koko
>
>
> On Mar 29, 2013, at 10:01 PM, Roland King <email@hidden> wrote:
>
>> That's not what the documentation says it does. It's called when the user logs in or out of iCloud or changes the iCloud account they are logged into. It says nothing about enabling or disabling Documents and Data.
>>
>> On 30 Mar, 2013, at 11:52 AM, koko <email@hidden> wrote:
>>
>>> I register for NSUbiquityIdentityDidChangeNotification as shown below.
>>>
>>>
>>> + (void)registerForAvailibilityNotification:(id)object
>>> {
>>> MasterViewController *mvc = object;
>>> [[NSNotificationCenter defaultCenter] addObserver: mvc selector: @selector (iCloudAccountAvailabilityChanged:) name: NSUbiquityIdentityDidChangeNotification object: nil];
>>> }
>>>
>>>
>>> In MasterViewController I have the notification as below
>>>
>>> - (void)iCloudAccountAvailabilityChanged:(NSNotification*)notification
>>> {
>>> NSLog(@"iCloudAccountAvailabilityChanged");
>>> }
>>>
>>> When I run this on iPad device and change the iCloud settings, turn off Documents and Data, I do not get notified.
>>>
>>> Is there something else to be done to receive the notification?
>>>
>>> -koko
>>>
>>> _______________________________________________
>>>
>>> Cocoa-dev mailing list (email@hidden)
>>>
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden