Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1309] iOS: File sharing

GitHub Issuen/a
TypeNew Feature
PriorityTrivial
StatusClosed
ResolutionWon't Do
Resolution Date2020-02-19T14:41:00.000+0000
Affected Version/sRelease 1.5.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterRalf Pfeiffer
AssigneeIngo Muschenetz
Created2011-04-15T02:49:04.000+0000
Updated2020-02-19T14:41:00.000+0000

Description

Please add this easy function in automatic mode: Sharing Files with the User

From SDK documentation.
Applications that want to make user data files accessible can do so using application file sharing. File sharing enables the application to expose the contents of its /Documents directory to the user through iTunes. The user can then move files back and forth between the device and a desktop computer. This feature does not allow your application to share files with other applications on the same device, though. To share data and files between applications, you must the pasteboard or a document interaction controller object.

To enable file sharing for your application, do the following:

1.Add the UIFileSharingEnabled key to your application’s Info.plist file and set the value of the key to YES.
2.Put whatever files you want to share in your application’s Documents directory.
3.When the device is plugged into the user’s computer, iTunes 9.1 displays a File Sharing section in the Apps tab of the selected device.
4.The user can add files to this directory or move files to the desktop.

Applications that support file sharing should be able to recognize when files have been added to the Documents directory and respond appropriately. For example, your application might make the contents of any new files available from its interface. You should never present the user with the list of files in this directory and ask them to decide what to do with those files.

Important: In iTunes, users can manipulate only the top-level items in the Documents directory. Users cannot see the contents of subdirectories but can delete those directories or copy their contents to the desktop. You should take this into consideration when deciding where to put files in this directory.

To make it work manual:
If you edit plist.info in /Library/Application Support/Titanium/mobilesdk/osx/1.3.X/iphone
works perfect!
Just be carefull to set "YES" the UIFileSharingEnabled key in the plist as boolean value type, otherwise xcode get it as string and filesharing won't work.

Comments

  1. Neville Dastur 2012-05-28

    This is such a trivial fix it would be really great if this could be done. There are many requests and questions about this in the Q&A

JSON Source