can't find /var/mobile/applications directory for ios documents

前端 未结 8 2047
我寻月下人不归
我寻月下人不归 2021-02-04 02:28

I\'m trying to run a release build on my iPad device connected to xcode for debugging. I\'m not certain but guessing that when I do this the documents directory ends up somewher

相关标签:
8条回答
  • 2021-02-04 02:55

    For "xcode 6":

    1. Connect your device with your MAC (You can sure about that having a look into the simulator list, it should be there)
    2. Now open xcode and go to "Windows" from upper menu
    3. Go to "Devices" from drop down list
    4. Now this window will pop up. Your app should be there in the "Installed Apps" section. Like the picture below. Double click on it.

      enter image description here

    5. Here you can see the "Documents" folder and the photos you saved earlier. You can't delete photo from this list. Because this is the iPhone device section, you accessing through the xcode.

      enter image description here

    6. If you want to delete the photos, you have to delete the whole project. To do that, scroll down below the screen and there should be a minus "-" button. After selecting your project just click on it. It will delete your photos as well as whole project.

      enter image description here

    0 讨论(0)
  • 2021-02-04 02:55

    Window -> Organizer -> select your's Iphone -> Applications -> select your iphone project name and you can see blow in the "Data files in Sandbox"

    0 讨论(0)
  • 2021-02-04 02:56

    Add this to your info.plist source code and you will find the recorded files inside files of iPhone device.

    <key>UIFileSharingEnabled</key>
    <true/>
    <key>LSSupportsOpeningDocumentsInPlace</key>
    <true/>
    
    0 讨论(0)
  • 2021-02-04 02:58

    (Original poster here) A few things I got wrong:

    1. Running it on the device whether with the debugger or not always puts the file on the device, not on the local drive. This /var/mobile directory must be essentially some location on the device itself that can't normally be accessed browsing from the mac.
    2. I needed to refresh the view in Organizer to see the files being placed there. I did so by detaching the iPad and then reattaching it (the usb), and the files would refresh.

    Instead of removing the question, I'll leave this here for others and myself for the tip in viewing/refreshing files in organizer and the clarification of where the files are being placed when run on the device.

    0 讨论(0)
  • 2021-02-04 02:58

    To anyone looking out for the exact answer:-

    1.Go to plist file of your project.

    2.Add one row.

    3.Then set the Boolean value of the property "Application supports iTunes file sharing" to "YES"

    And you are good to go.

    Also note that you have to plugin the device in order to access the copied files (Programmatically). If you happen to go and try to access it on computer .. you wont be able to find the files.

    0 讨论(0)
  • 2021-02-04 02:59

    Thank you they are both right in different contexts

    If you are running it on device then what @ethemsulan is correct.

    And then on the simulator the folder is found on your mac and the file path is as @Vin and @Osiris has given

    0 讨论(0)
提交回复
热议问题