Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 8 Extension using iCloud Data

I have an app that uses Core Data with iCloud to sync it's data across devices.

Now I want to display some of those data using a notification center widget of iOS. It is important that the notification center is up to date even without starting the app to do an iCloud update.

So I thought it would work just to use the same iCloud persistence stack for the extension.

I'm calling the creation of the stack in the - (id)initWithCoder:(NSCoder *)aDecoder method.

The issue that I'm experiencing is that the extension reconnects everytime one swipe down of the Notification Center to iCloud, which would be alright but after that it requires a second opening of Notification Center to see the current data which seems strange.

Has anybody some experience in using iCloud with this? And is there a best pratice to create an managedobjectcontext which shouldn't be reloaded overtime or is this just wrong for those kinds of extensions?

Edit: Some discussions on the dev forum are about the exact same problem but however there is no real solution for it. So I' starting this bounty.

like image 763
arnoapp Avatar asked Nov 10 '22 02:11

arnoapp


1 Answers

It's not possible to use iCloud Core Data stores with iOS8 Extensions, according to updates in this thread in devforums: https://devforums.apple.com/message/1051015#1051015

like image 151
Z S Avatar answered Nov 14 '22 23:11

Z S