How does an OS X user log into a CloudKit app?

I'm currently working with a startup company that is trying to use CloudKit — their customers are almost exclusively mac desktop users.


If accountStatusWithCompletionHandler() returns a CKAccountStatus that a user is not logged in, how do we prompt the user to authenticate?


It appears that JS library has a OAuth style popup window, but there is no native equivalent. I assume they are supposed to know to the System Preferences panel, but this is not in line with the web or iOS approach. A dialog prompt was expected, rather than an error.

AFAIK there is no way in both iOS or macOS to force an iCloud authentication prompt.


** I was trying to explain here why but the forum didn't let me save the text complaining about an illegal character....**


The only solution I know of is to display a prompt which educates the user on how to sign into iCloud in preferences and make sure iCloud drive is enabled.

How does an OS X user log into a CloudKit app?
 
 
Q