Access CloudKit from Android?
Asked Answered
M

3

7

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

Merla answered 10/6, 2015 at 22:2 Comment(2)
can we use cloudkit in cross platform too (Android)? can you please guide me if you know. Thanks.Needham
You might want to look at this github.com/jaumecornado/DroidNubeKitRetain
A
3

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.

Anchovy answered 10/6, 2015 at 23:7 Comment(0)
D
2

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.

Diametral answered 11/6, 2015 at 9:33 Comment(3)
public database access requires too if not just query operation ones need, but modifying records tooHinojosa
are you sure? Did you try this or did you infer this from the new session on CloudKit JS?Diametral
As soon as I heard from the WWDC video that you have to log in using your Apple ID, I stopped watching and knew that's not going to work for web nor Android.Boz
A
0

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.

Alkane answered 3/3, 2016 at 11:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.