ios8 Core Data iCloud Today Widget not synchronizing -


i have been unsuccessful in getting core data work on app , today widget on device.

let url  = nsfilemanager.defaultmanager().containerurlforsecurityapplicationgroupidentifier("group.mygroup.name").urlbyappendingpathcomponent("filename.sqllite") var error: nserror? = nil  let options = [nsmigratepersistentstoresautomaticallyoption: true,             nsinfermappingmodelautomaticallyoption: true,nspersistentstoreubiquitouscontentnamekey:"sharedcontainername"         ]         let s = coordinator?.addpersistentstorewithtype(nssqlitestoretype, configuration: nil, url: url, options: options             , error: &error) 

i have added group container use url of stores. have noticed on simulators persistent coordinator points same sqllite file

(url: file:///users/xxxx/library/developer/coresimulator/devices/6cxxxxxx/data/containers/shared/appgroup/e65xxxxxx/filename.sqllite))

this seems work fine on simulator , can store data in main app , fetch in today widget. when run code on device files @ different locations , databases not synchronized (no data on today widget).

my main app

(url: file:///private/var/mobile/containers/shared/appgroup/2ccxxx/coredataubiquitysupport/mobile~f74xxx/sharedcontainername/0e8xxxx/store/filename.sqllite))

today widget

(url: file:///private/var/mobile/containers/shared/appgroup/2ccxxx/coredataubiquitysupport/mobile~f74xxx/sharedcontainername/2fbyyyy/store/filename.sqllite))

i assuming should fine should synchronized icloud. widget runs fine, has no data (like has not been synchronized). debugging has been tricky unable console output while running today widget. when run widget xcode opposed attaching running process (the way can output on console) receive error core data icloud: error: initial sync notification returned error brclouddocserrordomain error 12. receive no notifications. maybe icloud , core data not work @ time today widget? core data code in app , extension identical not think have bug.

according this apple developer forum message apple employee:

none of icloud accessible within extension in ios 8.0

and adds in message:

document syncing, should clarify, or requires file coordination. i'm not sure kvs or cloudkit

the recommendation expose application state extensions using other method (plist, separate files, etc), bit of bummer.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -