Post

Replies

Boosts

Views

Activity

Reply to Collaboration Preview Image and Title for CKShare When Collaborating With CloudKit
Thank you for providing your code – the pithy/focused logic helped me to home in on the problem in my code. I failed to update the CKShare's metadata after uploading it to the CloudKit server. The returned share (or the share flushed locally) does not hold onto the metadata assigned to the share prior to submission to CloudKit servers. The metadata has to be reassigned after retrieval of the freshly saved share and prior to the execution of the NSItemProvider's preparationHandler. ––– Updating the code... Previous: let itemProvider = createItemProvider(for: share) { try await self.saveNewShare(share, rootRecord: rootRecord, container: AVSCloud.container()) } Updated: let itemProvider = createItemProvider(for: share) { let savedShare = try await self.saveNewShare(share, rootRecord: rootRecord, container: AVSCloud.container()) savedShare.updateMetadata(note: note) return savedShare } Thank you.
Jul ’24
Reply to cannot find type 'ConfigurationIntent' in scope
I ran into this same issue and solved it – @iceleaf is correct. To elaborate... Manually create a bridging header file in the widget target. Go into the the target settings for the widget, select build settings, and under "Swift Compiler - General" make sure that "Objective-C Bridging Header" has the correct path (ie, "<widget-target-name>/<project-name>-Bridging-Header.h"). Navigate to the bridging header file and add #import "ConfigurationIntent.h" Everything should once again compile.
Sep ’20