Quote:
Quote:
From iPhone OS 3.2 Documentation:
"Formalized Support for Handling Documents and Files
To support the ability to create productivity applications, iPhone OS 3.2 includes several new features aimed at support the creation and handling of documents and files:
Applications can now register themselves as being able to open specific types of files. This support allows applications that do need to work with files (such as email programs) the ability to pass those files to other applications.
The UIKit framework now provides the UIDocumentInteractionController class for interacting with files of unknown types. You can use this class to preview files, copy their contents to the pasteboard, or pass them to another application for opening.
Applications with the UIFileSharingEnabled key in their Info.plist file can share files with the user’s desktop computer. A connected iPad device shows up on the user’s desktop and contains subdirectories for all applications that share files. The user can transfer files in and out of this directory.
Of course, it is important to remember that although you can manipulate files in your iPad applications, files should never be a focal part of your application. There are no open and save panels in iPhone OS for a very good reason. The save panel in particular implies that it is the user’s responsibility to save all data, but this is not the model that iPhone applications should ever use. Instead, applications should save data incrementally to prevent the loss of that data when the application quits or is interrupted by the system. To do this, your application must take responsibility for managing the creation and saving the user’s content at appropriate times.
Of course, sometimes interacting with files is necessary. If your application creates files that can be exchanged with a desktop computer, you might need to write files to your application’s file-sharing directory. In this case, always be mindful that the user can add or remove files from that directory. Applications should look for new files in this directory and present them to the user automatically. If the user puts a file in the directory whose type your application does not recognize, you can use a UIDocumentInteractionController object to manage the file-related interactions for you as appropriate."








