brightdigit / MistKit

Swift Package for Server-Side and Command-Line Access to CloudKit Web Services
MIT License
205 stars 11 forks source link

A Question about public databases #102

Open yousifKashef opened 2 years ago

yousifKashef commented 2 years ago

Is a token required to access the public database of a CKContainer? I ask only shared and private databases are mentioned

leogdion commented 2 years ago

Yeah public databases aren't supported yet. I'll add that to the roadmap.

yousifKashef commented 2 years ago

thanks for clearing that up

leogdion commented 2 years ago

Just to circle back, this should work though I haven't tested using the standard web auth via Apple ID method but also via a Server-to-Server token. I'm not sure I support the server-to-server token yet. So if you want to test that out feel free but the current Apple ID method should still work. Obviously with a Public db that seems unnecessary hence the server-to-server token. If you are interested, you can take look at how both methods work here: https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6

yousifKashef commented 2 years ago

Hi Leo,

Thanks for following up about this. Correct me if I’m wrong (please!) but the documentation you sent appears to suggest that I may be able to communicate with the public database without the need for Apple ID authentication (server token only). Do you concur? This would be perfect for what I’m trying to do. The reason I found MistKit is because I need CloudKit access from an app clip and those don’t support it yet. Up until I saw the documentation you shared with me I was under the impression that this would be impossible without having the user sign in to their Apple ID from the app clip, which would be nuts in terms of user experience. Anyway, if the train of thought I lay out here is feasible, I’d love to help you extend MistKit to accommodate AppClip island hopping to CloudKit

On Nov 1, 2021, at 5:20 PM, leogdion @.***> wrote:

 Just to circle back, this should work though I haven't tested using the standard web auth via Apple ID method but also via a Server-to-Server token. I'm not sure I support the server-to-server token yet. So if you want to test that out feel free but the current Apple ID method should still work. Obviously with a Public db that seems unnecessary hence the server-to-server token. If you are interested, you can take look at how both methods work here: https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW6

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.