Document Directory Path of Xcode Device Simulator

Document directory path of Xcode Device Simulator

on my computer, the path is:

~/Library/Developer/CoreSimulator/Devices/1A8DF360-B0A6-4815-95F3-68A6AB0BCC78/data/Container/Data/Application/

NOTE: probably those long IDs (i.e UDIDs) are different on your computer.

Document folder iOS Simulator

Set and hit a breakpoint in the app, and write the following in the Xcode Console (next to the Variables View):

po NSHomeDirectory()

Then in Finder hit Shift+CMD+G, paste the path returned above without the quotation marks and hit enter.

Where is the app content folder in the simulator of Xcode?

I found it in the following path.

~/Library/Developer/CoreSimulator/Devices/(SIMULATORID)/data/Containers/Data/Application/(APPLICATIONID)

You can also look into this application for more details.

List of simulator devices can be found in the below path:

~/Library/Developer/CoreSimulator/Devices/

Below file has simulator information:

~/Library/Developer/CoreSimulator/Devices/{UUID}/device.plist

access documents directory on physical device

Follow the steps.

Sample Image

Select Add Additional Simulators. From devices tab select your application and download container. You'll find all details.

Sample Image

Where can I find the MyDocuments folder on iPhone Simulator?

See Building Great Document-based Apps in iOS 11.

If you want to see it in the files app, you’ll want to set the following value in your Info.plist:

  • “Supports Document Browser” (UISupportsDocumentBrowser)

Or

  • “Application supports iTunes file sharing” (UIFileSharingEnabled); and
  • “Supports opening documents in place” (LSSupportsOpeningDocumentsInPlace)

Xcode: directory file for simulator Iphone

I'm not sure if you are able to write in your bundle, but you can in your Documents directory instead as your code does. Why don't you try this?

Use the same code and you will find your file in:

/Users/YOURUSER/Library/Application Support/iPhone Simulator/IOSVERSION/Applications/APPID/Documents/file.txt

How can I add files to the iOS simulator?

You can upload files to iCloud Drive of the account you are logged in with on the simulator, and access them by navigating to Browse/iCloud Drive inside the Files app or a file upload dialog.



Related Topics



Leave a reply



Submit