Home > Articles > Mobile Application Development & Programming

  • Print
  • + Share This
This chapter is from the book


Want to share data across applications? This chapter showed you how. You read about UTIs and how they are used to specify data roles across applications. You saw how the pasteboard worked, and how you could share files with iTunes. You read about monitoring folders and discovered how to implement custom URLs. You dived deep into the document interaction controller and saw how to add support for everything from printing to copying to previews. Here are a few thoughts to take with you before leaving this chapter:

  • You are never limited to the built-in UTIs that Apple provides, but you should follow its lead when you decide to add your own. Be sure to use custom reverse domain naming and add as many details as possible (public URL definition pages, typical icons, file extensions) in your exported definitions. Precision matters.
  • Conformance arrays help you determine what kind of thing you’re working with. Knowing that it’s an image and not, say, a text file or movie, can help you better process the data associated with any file.
  • The general pasteboard offers a terrific way to work with shared data, but if you have application-specific needs for cross communication, there’s no reason you can’t use a custom pasteboard to share information. Just be aware that pasteboard data will not persist across reboots.
  • The Documents folder belongs to the user and not to you. Remember that and provide respectful management of that directory.
  • The documents interaction controller supercedes a lot of the reasons many developers used to use custom URL schemes. Use the controller to provide the app-to-app interaction your users demand and don’t be afraid of introducing annotation support to help ease transition between apps. Offering a “return to previous app” button using annotation details is a lovely way to support full-platform app integration.
  • Don’t offer an “Open In” menu option unless there’s an “Open In” controller ready to back up that button. The solution you read about in this chapter is crude but it’s better than dealing with angry, frustrated, or confused users through customer support.
  • Settings bundles? Just say no.
  • + Share This
  • 🔖 Save To Your Account