So I am trying to sync only some of my Models with iCloud and others kept locally in the default.store. I am having a world of issues so before I start looking for the needle in my haystack. I would like to ask this forum, is my approach one that should work as desired or is my code obviously why things are not working? All my Models have default values and relationships where needed are optionals. iCloud is working but my issue arises when i try to exclude some models. So I want to sync "modelsForCloudSyncing" but not "modelNotForCloudSyncing" In advance thank you
var avoidCloudSyncModelContainer : ModelContainer = {
let modelNotForCloudSyncing = Schema([NoCloudSyncModel.self])
let modelConfigForNoCloudSync = ModelConfiguration(schema: modelNotForCloudSyncing, cloudKitDatabase: .none)
let modelsForCloudSyncing = Schema([CloudSyncModelA.self, CloudSyncModelB.self, CloudSyncModelC.self])
let modelConfigForCloudSync = ModelConfiguration(schema: modelsForCloudSyncing, cloudKitDatabase: .automatic)
do {
return try ModelContainer(for: NoCloudSyncModel.self, CloudSyncModelA.self, CloudSyncModelB.self, CloudSyncModelC.self, configurations: modelConfigForNoCloudSync, modelConfigForCloudSync)
}
catch { fatalError("Could not create ModelContainer: \(error)") }
}()
...
{
ContentView()
}.modelContainer(avoidCloudSyncModelContainer)
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Running extension either on physical device or simulator.
When trying to get the console log in Safari > Develop > Device >
The main page shows but when launching the popup.js extension it doesn't show in order to see console.
Works fine iOS 17*
Not available iOS 18
FB14109978