Skip to Main Content
Core Data in Objective-C, 3rd Edition
book

Core Data in Objective-C, 3rd Edition

by Marcus S. Zarra
June 2016
Beginner to intermediate content levelBeginner to intermediate
240 pages
6h 17m
English
Pragmatic Bookshelf
Content preview from Core Data in Objective-C, 3rd Edition

Import Operation

The reverse of exporting recipes is to be able to import them. The experience we’re looking for is as follows:

  1. The user receives a recipe in another application (for example, in Mail).
  2. The user taps the recipe, and it opens in our application.
  3. Our recipe application receives the data and consumes it.

To accomplish this workflow, we need to step into our UIApplicationDelegate and do a few updates.

 -​ (BOOL)application:(UIApplication *)application
  openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
  annotation:(id)annotation
 {
 if​ ([[self dataController] isPersistenceInitialized]) {
  [self consumeIncomingFileURL:url];
  } ​else​ {
  [self setFileToOpenURL:url];
  } ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

iOS Programming Cookbook

iOS Programming Cookbook

Hossam Ghareeb
Learning Cocoa with Objective-C, 4th Edition

Learning Cocoa with Objective-C, 4th Edition

Paris Buttfield-Addison, Jonathon Manning, Tim Nugent

Publisher Resources

ISBN: 9781680502022Errata Page