- Home /
u3dxt: how to check if iCloud is connected?
Hi!
I'm using iCloudPrefs to store key/value pairs in iCloud, and want to display a message to the user if iCloud isn't connected. Any way to access this information?
Great plugin, by the way!
Answer by u3dxt · Apr 18, 2014 at 08:44 PM
Hi, you can use the iCloudPrefs.iCloudID property to check. http://u3dxt.com/api/?topic=html/P_U3DXT_iOS_Data_iCloudPrefs_iCloudID.htm. If null or empty string, that means the user has not logged into iCloud. Otherwise, it's a string representing the ID.
Thanks for the fast response. I did think of that, but it doesn't seem to cover the case where the user was logged into iCloud and then lost connectivity while playing (in which case the string keeps its value). Not a major problem, though.
I noticed the inline comments for iCloudID note that it's available in iOS 6 or later. What about for apps that support iOS 5? Could I use the AccountChanged event ins$$anonymous$$d in iOS 5?
Your answer
Follow this Question
Related Questions
U3DXT Init failed, everything is setup 1 Answer
Using MediaExporter to save to MP3 1 Answer
Just got u3dxt essentials, throws errors and doesn't load examples. 1 Answer
u3dxt causing failed validation 2 Answers
Has U3DXT been abandoned? 2 Answers