How to Checked user Logged into iCloud in Swift?
Normally you can checked from Setting. Go to setting > iCloud and Checked, User is Logged In in iCloud or Not, But it is manually checked, But here want to check using programming, Because You are programmer (iOS Developer).
See the below Method to checked user Logged In in iCloud or Not.
Now Calling this Method in ViewDidLoad Method as below.
Logged In iCloud : Then print True and got UbiquityIdentityToken value as : 5a988852 0we34r5t a98u34t6 weet45y3.
Not Logged In iCloud : Then print False and got UbiquityIdentityToken value as : Nil.
NOTE : IF You are Checking in device and login in iCloud , But you get UbiquityIdentityToken as nil , Then Your provisional profile in Invalidate or Expired. Download New Provisional, after you get token.
How to Checked user Logged into iCloud in Swift? Reviewed by Kirit Modi on 09:24:00 Rating: