London Escorts sunderland escorts 1v1.lol unblocked yohoho 76 https://www.symbaloo.com/mix/yohoho?lang=EN yohoho https://www.symbaloo.com/mix/agariounblockedpvp https://yohoho-io.app/ https://www.symbaloo.com/mix/agariounblockedschool1?lang=EN
0 C
New York
Thursday, January 30, 2025

ios – Core Knowledge: Merging related adjustments between extensions and iCloud units


I’m engaged on an interactive widget and merging adjustments offered by a consumer over it with the app. I retailer my knowledge, utilizing Core Knowledge. Nevertheless, I observed a problem with sync between different consumer’s units after that individual made a change over the widget (in my case, it’s finishing a job). Right here is my schema:

Major app: it appears to be like for related transactions (https://developer.apple.com/documentation/coredata/consuming_relevant_store_changes). When it discovered that one, the app merges adjustments:

if transaction.writer == "widget" {
    if let userInfo = transaction.objectIDNotification().userInfo {
        NSManagedObjectContext.mergeChanges(fromRemoteContextSave: userInfo, into: [taskContext])
    }
}

Widget: If the consumer clicks on the checkbox to be able to full a job, utilizing an AppIntent class, app creates an an identical NSPersistentCloudKitContainer and completes the duty. Nevertheless, in that case, the NSPersistentCloudKitContainer of the widget doesn’t search for adjustments.

That works accurately. Nevertheless, solely in an area surroundings. This is why:

  1. If I full a job (utilizing a widget) and launch the app on the identical gadget, the change might be synced accurately.
  2. If I full a job (utilizing a widget) (on gadget A) and launch the app on one other gadget (on gadget B), the change won’t be utilized (on gadget B), till I open the app on the gadget that I made the change on (on gadget A).
  3. If I open the app on gadget B after I opened it on gadget A (and the modified has been utilized), on gadget A I get a distant notification with the writer worth=”NSCloudKitMirroringDelegate.import”, not ‘widget’.

The purpose of my situation is that the distant notifications about adjustments made, utilizing widgets, doesn’t arrive to different units like notifications initialised by the primary app. Thanks prematurely!

Related Articles

Social Media Auto Publish Powered By : XYZScripts.com