I'm building an app which also includes a today widget. The today widget should be able to read data from core data. I found a tutorial (http://weblog.invasivecode.com/post/108082269360/sharing-data-between-apps-and-their-extenstions) in the internet and did all the steps which were described. What do I have to do that I can use the fetched results controller in my today widget (I already implemented the fetched results controller code in my class)?
Asked
Active
Viewed 952 times
2
-
The same way as in any other table view? – Mundi Apr 17 '15 at 22:25
-
possible duplicate of [Accessing Core Data SQL Database in iOS 8 Extension (Sharing Data Between App and Widget Extension)](http://stackoverflow.com/questions/24641768/accessing-core-data-sql-database-in-ios-8-extension-sharing-data-between-app-an) – Duyen-Hoa Apr 17 '15 at 22:27
-
No I get an error: `Use of undeclared type 'AppDelegate'` in this line of code: `var appDel: AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate` – horst Apr 18 '15 at 14:29
-
@Mundi No! We are experiencing the error: 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead. Thus, we can't get managedObjectContext as old way. – Yi Jiang Jul 13 '15 at 00:54