Post

Replies

Boosts

Views

Activity

Disable automatic iCloud sync with SwiftData
Is there a way to use SwiftData without automatic iCloud sync? I’d like to do that manually using my own CloudKit solution or CKSyncEngine. SwiftData automatically picks up any CloudKit containers though and I have not seen an option to disable this behavior. Setting cloudKitContainerIdentifier to nil does still pick the first available CloudKit container. Just in case this is a bug: FB12276416 Sample: let configuration = ModelConfiguration(cloudKitContainerIdentifier: nil) let modelContainer = try! ModelContainer(for: [GamesCollection.self], configuration) print(modelContainer.configurations) // [SwiftData.ModelConfiguration(url: …, name: …, sharedAppContainerIdentifier: …, cloudKitContainerIdentifier: Optional("iCloud.CloudKit.com.+++")
14
4
4.9k
Mar ’24
Disable automatic iCloud sync with SwiftData
Is there a way to use SwiftData without automatic iCloud sync? I’d like to do that manually using my own CloudKit solution or CKSyncEngine. SwiftData automatically picks up any CloudKit containers though and I have not seen an option to disable this behavior. Setting cloudKitContainerIdentifier to nil does still pick the first available CloudKit container. Just in case this is a bug: FB12276416 Sample: let configuration = ModelConfiguration(cloudKitContainerIdentifier: nil) let modelContainer = try! ModelContainer(for: [GamesCollection.self], configuration) print(modelContainer.configurations) // [SwiftData.ModelConfiguration(url: …, name: …, sharedAppContainerIdentifier: …, cloudKitContainerIdentifier: Optional("iCloud.CloudKit.com.+++")
Replies
14
Boosts
4
Views
4.9k
Activity
Mar ’24
New NSSearchToolbarItem in Mac Catalyst
What's the recommended way to add a search bar in Mac Catalyst? The new NSSearchToolbarItem that was introduced in macOS 11 is not available in Catalyst. What's the alternative? FB7828248
Replies
2
Boosts
0
Views
1.4k
Activity
Aug ’22