#iosdev #buildInPublic #coredata #swiftTesting

Will be exploring Apple’s cktool for #cloudkit setup, which hopefully will let me populate data that will let me test sync

https://developer.apple.com/icloud/ck-tool/

27/n

cktool - iCloud - Apple Developer

Find details on using cktool.

Apple Developer
Wondering if you can share your data with SQLiteData from @pointfreeco Well wonder no more. It just works!!!!!
Fantastic #CloudKit #Swift #SwiftUI #SQLite

#iosdev #buildInPublic #coredata #cloudKit

Roughed in a little prototype - UI mostly done, some test classes to create Tunes and TuneSets. Tomorrow rough in Collections. Nice that UIKit now lets us add UISplitViewControllers as tabs on UITabControllers.

15/n

#iosdev #buildInPublic #coredata #cloudKit

So the next question is - create a purpose-built prototype to experiment with attributed relationships or bang away at a disposable branch of my main project? I know what I _should_ do... And it will make things easier to share here without distractions. So a new project using Storyboard (i.e. UIKit) template with CoreData. Minimum deployment will be iOS 17. No CloudKit as yet, I want to be able to test migration from ordered many:many .

14/n

#iosdev #buildInPublic #coredata #cloudKit

Enough for tonight. Tomorrow I'll start prototyping the migration from explicitly ordered many:many to implicitly ordered via intermediate attributed relationship objects.

13/n

#iosdev #buildInPublic #coredata #cloudKit I also have make sure I'm selecting the Private database and the com.apple.coredata.cloudkit'recordName' is not marked queryable

https://lyons.app/2021/07/05/how-to-fix-field-recordname-is-not-marked-queryable-in-cloudkit/

gave me the answer: I have to modify the schema by adding a queryable index called recordName to the recordName metadata field for each record type so I can view the records. I also have make sure I'm selecting the Private database and the com.apple.coredata.cloudkit zone.
12/n
Edit: to fix link

How to fix “Field ‘recordName’ is not marked queryable” in CloudKit

The issue While writing an iOS app in Swift using CloudKit and CoreData with NSPersistentCloudKitContainer, I ran into the issue “Field ‘recordName’ is not marked queryable”…

Elaine Lyons

#iosdev #buildInPublic #coredata #cloudKit

Got the demo working after some annoying debug sessions. Seems like it has not been revisited since 2022, and iOS 18 changed the behaviour of collectionView.dequeueReusableCell - as of iOS 18 it asserts if you call it outside of cellForItemAt indexpath. it was being called in awakeFromNib to set a font.

You would think that a company with the resources of Apple would at a minimum task interns to COMPILE AND RUN demos called out in the docs 11/n

#iosdev #buildInPublic #coredata #cloudKit

There is some Apple demo code from WWDC 2022 that gives an example of deduplication on CloudKit sync. It's a simplified demo but it does give an example of a many:many (unordered) relationship. Let's see if we can get it running.
https://developer.apple.com/documentation/coredata/synchronizing-a-local-store-to-the-cloud

10/n

Synchronizing a local store to the cloud | Apple Developer Documentation

Share data between a user’s devices and other iCloud users.

Apple Developer Documentation
Beer Diary version 2.4 released

Stuff about iOS development, Linux and more

Benjamin’s Blog

#indiedev #irishmusic #iosdev #buildInPublic #coredata #cloudKit

As an aside - I've learned a lot about CoreData and CloudKit from @fatbobman's blog.

https://fatbobman.com/en/posts/coredatawithcloudkit-1/

9/n

Core Data with CloudKit - The Basics

Explore Core Data with CloudKit: seamless cloud storage & multi-device sync for your apps. Learn its advantages, limitations, and key concepts. Dive in now!

fatbobman.com