Are the new CloudKit REST APIs intended to be used from server-side apps also?

The new CloudKit APIs look interesting. But I am not interested in using them from a client-side JavaScript application. Instead I would like to use them from a server-side process that manages the user's data.


Is this possible? Or is this not the intended use-case?


S.

Replies

According to the WWDC 2015 "CloudKit JS and Web Services", ~ 8', yes !

According to the 'CloudKitConfig' section of the CloudKitJS Types Reference documentation you can also use it from another server.

The 'Services' configuration gives you the ability to store auth tokens on your server after a user signed in so you can handle all the non–Apple user's data management on your own.


https://developer.apple.com/library/prerelease/ios/documentation/CloudKitJS/Reference/CloudKitJSTypesReference/index.html#//apple_ref/c/tag/CloudKitConfig


I didn't try it yet since I have my fights with the simple JavaScript client implementation, though.

The 'Services' configuration gives you the ability to store auth tokens on your server after a user signed in so you can handle all the non–Apple user's data management on your own.

Yeah I figured this out too. The problem is, I don't want people to sign in twice, or via the web at all.

Ideally you should be able to pass some kind of auth token from your native iOS app to your server and then use that to do work on the user's behalf on the server-side.

Investigating a bit more before I start filing a Radar request.

S.