I am developing an iOS / macOS app that will be privately distributed either directory or through B2B for iOS. Many different iOS devices will be used to store record data and ideally, those devices will NOT be signed in to iCloud. I know it is possible to read from the public database to get general app records, but in my case I need the app to WRITE to the public database.
Ideally I wish I could authenticate the iOS app with an API key, but there is no direct API for this that I know of.
I see with CloudKit server-to-server that this is possible for web apps. Would there be anything stopping me from doing a URLRequest in my iOS app with the same web-server header and requirements using the generated key? I would rather use CloudKit for this particular app than relying on Firebase and other BaaS.
Any thoughts or ideas?