Post

Replies

Boosts

Views

Activity

On iOS 15.2, how do I load a cloudKit public container with user not logged in to iCloud
I am using the following to initialize my PersistenCloudKitContainer with the goal of loading a shared poblic cloudKit database: container = NSPersistentCloudKitContainer(name: "FaceExplorer")           guard let description = container.persistentStoreDescriptions.first else {        print("Can't set description")        fatalError("Error")      }             //ios 14 bug fix https://developer.apple.com/forums/thread/682925     description.cloudKitContainerOptions?.setValue(1, forKey: "databaseScope") // "normal" / ios 15 version description.cloudKitContainerOptions?.databaseScope = .public           //seems to work & Load on iOS14.5     description.cloudKitContainerOptions?.setValue("iCloud.com.myDomain.myContainerID", forKey: "containerIdentifier") container.loadPersistentStores(completionHandler: { (storeDescription, error) in ... This all works great on iOS14 and also loads on iOS15.0 - 15.2 with users logged into iCloud with the iCloud drive option checked. However, when the iCloud drive option is not checked on iOS15 only, the container will not load. Please help me figure out what I might be missing or doing wrong. Thanks
0
0
511
Jan ’22
can I get current location in widgetKit
As far as I can tell in my app I am requesting current location in the app and in the widget the same, but I am not ever seeing my widget make the network call the I would expect if current location was successful. I have the same info plist permissions for usage and request for access in both the app and the widget ( runs the same shared code ). My question is does widgetKit work to get core location similar to the the way that today extensions work. or do I need to cache it from the phone app and hope its been updated ?
4
0
2.8k
Aug ’20