Breaking News
Home / iOS / iOS Snippets / What is the location of files under the Documents Directory for an iOS app?

What is the location of files under the Documents Directory for an iOS app?

Answer

In Simulator

/Users/<YOURUSER>/Library/Application Support/iPhone Simulator/<IOS-VERSION>/Applications/<APPID>/Documents/<your-file-name>

YOURUSER – Username you are logged in as

IOS-VERSION – The one you are running the app under ex. 6.0

APPID – A unique alphanumeric ID given to your app. Once you delete/clean your app it creates a new one.

your-file-name  – The file name that you are looking for.

e.g.

/Users/mvohra/Library/Application Support/iPhone Simulator/6.0/154FCF8C-B259-4A57-B8BB-E9FD3C1851D1/Documents/evaporation-4.jpg

In Device

/var/mobile/Applications/B29607A6-E18B-4CB3-A628-1E81A6C7B1AE/Documents/<your-file.txt>

e.g.

/var/mobile/Applications/154FCF8C-B259-4A57-B8BB-E9FD3C1851D1/Documents/evaporation-4.jpg

[pb_builder]

Check Also

EKCalendar – That account does not allow calendars to be added or removed

Usecase When I am trying to create a new Calendar programmatically using the EventKit API …

Advertisment ad adsense adlogger