KishoreThindaak
KishoreThindaak

Reputation: 401

Accessing Files from iOS

I know it is possible to access the gallery photos and pick them as UIImage using UIImagePickerController, but I want to know whether all other files like doc, txt, pdf etc can be accessed from device please help.

thanks

Upvotes: 0

Views: 588

Answers (3)

GameLoading
GameLoading

Reputation: 6708

There is no universal space to store that document in iphone like photos and videos. but you can store in your app and and using itunes file sharing you can access it. here is the way to enable itunes file sharing. you can store in icloud and access it from app.

  1. Select your project in top left
  2. Select target in next column
  3. Click on Info tab
  4. In Custom iOS Target Properties, hover mouse over any row and click +
  5. In popup, select "Application supports iTunes file sharing", then set Value to YES on right
  6. Click Validate Settings at bottom to make sure all is good

Upvotes: 1

neilco
neilco

Reputation: 8012

You can, but there's no built-in picker like there is for images. Take a look at the NSFileManager class for enumerating directories and working with files.

Upvotes: 3

Woodstock
Woodstock

Reputation: 22926

There is no GUI API to access the file system, you can create your own UI and read and write from your app's documents folder though.

Upvotes: 2

Related Questions