Access CloudKit from Android?

4.2k Views Asked by At

Is it possible to use CloudKit Web Service from Android native app? How will that authentication popup window appear in a native app if I want to let user able to modify records?

Can I put a button to the native app, that will open up browser and the redirected content will appear there, and when authentication successfull, specify a callback where token which uniquely identifies users, I guess user record name can be received?

Apple engineer talks about login from web here on this session video: https://developer.apple.com/videos/wwdc/2015/?id=704

3

There are 3 best solutions below

0
On

CloudKit Web Services is intended "to provide a web interface for users". If you use it to provide a native Android interface, you will probably get your iOS app rejected and lose your CloudKit access entirely.

But if you want to try it, Apple already has documentation for CloudKit Web Services which explains how to authenticate users.

3
On

From looking at the session video you mention, and also at the links and comments from Richard, I would say the answer is No to writing full native Android CloudKit apps. The reason is that Apple does not give you the option to enter the userID and password in your own dialog. The user can enter those only in a web window popped up by the apple code. So it seems at least that part of the app (authenticating the user) needs to be done using web code. I am not an Android programmer so perhaps it is possible to put together a hybrid app that addresses this issue.

Having said that, public database access does not require an iCloud account so you may be able to write an app that only uses access to the public part of your container using native Android code.

0
On

I am no expert but this is what I read on Apple website.

Use an API Token from a website or an embedded web view in a native app, or when you need to authenticate the user.

Maybe its like Netflix. Because Netflix iOS app looks just like netflix.com. To me it looks like netflix is using embedded web view. Maybe you can do the same with CloudKit.