Post not yet marked as solved
Anyone know how to load a large number of records into the CloudKit public database?
I need to load 1.2million records (about 150Mb) into the public database. no binary data. basically just a bunch of exchange rates that I need to have available to all my users.
I've been trying for months. have tried:
loading into core data on a device or simulator individually or in batches ranging from 400 records to 2500 (more than that exceeds batch size limits). it will start to sync and then stop. can often get it to restart by restarting device or similator but will eventually corrupt the database in iCloud requiring a reset of the environment. generally can get the load to go for a few days and load maybe 500k records before it breaks. to do that have to put delays up to a minute between batches loaded into core data.
have tried doing it using the CloudKit.js framework and loading from a server. this works for a small number of records. but limits are really small doing it through that interface. after a while it locks you out. don't get anywhere near the number of records I need to load.
I'm stuck. has anyone found a way?
same issue on all versions of iOS - 14, 15, 16b1
Post not yet marked as solved
Hi,
has anyone seen an example of Progressive Web App (PWA) using cloudkit js?
I am exploring that avenue for multiplatform support of an existing SwiftUI app using CoreData and CloudKit.
I see that this cloudkit.js demo uses vercel https://cloudkitjs.vercel.app/ so perhaps something based on next.js would be a natural progression here, but I don't really have a preference for one of the many frameworks out there (pwabuilder, angular, react, vue, next, and the list goes on and on)
Thanks
Post not yet marked as solved
Short version: Is it a terrible hack to use the URLs to remote CKAsset? And are they permanent?
I'm building an app that plays sound using AV(Queueu)Player and use CloudKit with CoreData to store the metadata. I was planning to also store the audio assets there, as CKAssets, but it seems like it's not really built for this use case, at least if I want to avoid downloading the files first.
What I mean is, AVPlayer plays audio from URLs, but CloudKit doesn't provide a simple way to get the URL for a remote asset, so it would seem I have to first sync the assets down to the local disk, which is what I want to avoid, I would prefer to stream them.
There is a way to get the URL, but only using CloudKit JS APIs, as described in [1], but is that a hacky workaround or something we can rely on? And are these URLs permanent? Finally, silly question perhaps, but even if the URLs are solid, can I safely stream audio from them?
[1] https://stackoverflow.com/questions/35104247/obtaining-ckasset-url-without-downloading-data
Post not yet marked as solved
Does the new encrypted fields work with CloudKit JS? I have checked the API for CloudKit JS, and under CloudKit.Record there is no mentioning of encrypted fields. It feels like this API has not been updated for a while. Does this mean that if I use field-level encryption, I will not be able to use CloudKit JS?
https://developer.apple.com/documentation/cloudkitjs/cloudkit/database/1628735-saverecords mentions that we can use the downloadURL to provide a link to the user, however it seems this URL will expire after some time, and it will return 410 GONE as http status code when it expires.
How long does the link persist before it expires, is it documented anywhere?
Hi All,
I'm very new to iOS app development. I've managed to complete the Scrumdinger tutorial. However, I would like to know how can I use CoreData or CloudKit to persist the data.
URL: https://developer.apple.com/tutorials/app-dev-training/persisting-data
I'm having trouble to bind the data to EditView(). Is there any online guide or tutorial that can help me?
Thank you!