iCloud does a lot of great things. It bridges the gap between iOS and macOS by storing and syncing app data and files so the user can access their stuff from any Apple device. Notes and Photos are excellent examples of the power of this service — if your stuff’s on one device, it’s reliably […]
On the CloudKit.configure documentation page, there’s a tantalizing sentence: To customize the sign in and sign out buttons, add signInButton and signOutButton keys to the auth dictionary. But I couldn’t find anything more about this. https://developer.apple.com/reference/cloudkitjs/cloudkit/1628513-configure
Thanks for the example. I’ve been trying to get an Android app working that basically contains the same capabilities that this web app has. I’ve created a WebView and loaded an HTML file the includes the cloud kit JS api, my javascript file with code from this example and places for the sign-in and sign-out buttons buttons to go. I am able to fetch the data from the public database and display it in a TextView. The javascript code you provide in the example works fine for me except when I run the setUpAuth method. It causes the Apple sign in button to appear in my app. However, when I press this button a new instance of Chrome mobile opens with the Apple sign in page. Then when I go to sign-in with my Apple ID the page goes to sign-in and just hangs indefinitely. Because of this, I can’t gain the authentication needed to make any changes to the public container from my app. Is Apple blocking sign-in requests from mobile browsers? Is there some workaround I can use, maybe another way to get a user authenticated so can make changes to a public container? Or is authentication from an Android app using CloudKit JS just not possible yet? Thanks Greg
Ray uses the TIL app, so you can compare with this CloudKit JS version.
And they’re all free!!
CloudKit has the potential downside that you can’t access your users’ identities unless they opt in. Some devs have told me some apps like/need to have this info, so rolling your own back-end would give you more control over authentication etc.
Thanks for the quick response.
So here is what I understood, I need to create an app id in the developer portal for which cloudkit is enabled and manager it from the dashboard.
from Certificates, Identifiers, Profiles, you can list and create iCloud containers, or you could create an empty app in Xcode, and turn on CloudKit capability, then Xcode will create the container for you, and a button for you to open it in the dashboard.
I can’t seem to get passed the “Your account does not have sufficient permissions to modify containers” message. this is regarding the “Cloud Kit Tutorial” Is there anyway to get around this? I am an Apple Developer but couldn’t find any helpful information.
You must be in the paid developer program to use CloudKit. If you’re using your paid dev account, and cannot access CloudKit, then contact Apple to see if they can fix your account.
This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]