0

I'm exploring the possibility of building a Today Extension for iOS8 and need advice wether this is feasible.

My host app enables a user to take photos with the camera, which then get saved locally within the app using Core Data. I want my Today Extension to select one of those photos at random and display it in the extension. A new, random photo will be selected each day.

Is it possible therefore for the Extension when launched/displayed in the Notification Center to access Core Data stored locally in the app (regardless wether the app is active or not), extract a photo/data and display it?

Andrew Davis
  • 2,310
  • 1
  • 24
  • 43

1 Answers1

2

It is possible if you put your core data database in the shared container, not just a directory within the containing app's sandbox.

See this link where it discusses the shared container: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW6

jlw
  • 3,166
  • 1
  • 19
  • 24