(iphone) access device's documents directory from mac?

前端 未结 8 935
心在旅途
心在旅途 2020-12-01 09:02

I\'m trying to access the documents directory at iphone device to see a log file that I saved while executing the app.

I know this can be done for simulator. (you

相关标签:
8条回答
  • 2020-12-01 09:23

    With MacOS Catalina, Apple has made it very easy for reading the files written from the Documents directory.

    Here are the steps:

    1. Once the device is connected to the Mac, it should be listed under the 'Locations' section in Finder as follows:

    1. Select the device. From the tab bar below the device details select 'Files'. You will be able to see a list of apps that stored files to the Documents directory. Expanding each app will show the files with its document directory.

    You can drag and drop these files to any location in the Mac for further use

    0 讨论(0)
  • 2020-12-01 09:25

    Hi Viraj's anwer is the way to go .Here is a screenshot: enter image description here

    0 讨论(0)
  • 2020-12-01 09:28

    You can open Organizer in Xcode and download the documents directory when your device is connected right ?

    0 讨论(0)
  • 2020-12-01 09:33

    iOS provides a framework to share documents between your application & iTunes. Check out the Core Services Layer section of the Apple docs, specifically the File-Sharing Support section. It explains how to do this:

    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.

    On a side note, if this is just for debugging, you can always print logs using the default NSLog function and check the output using OS X's Console.

    0 讨论(0)
  • 2020-12-01 09:35

    In Xcode 6 you should open Devices window to download it.

    enter image description here

    0 讨论(0)
  • 2020-12-01 09:35

    You also can use itunes for the same, but to view in itunes make change as below in your .plist Add new key as "Application supports iTunes file sharing" and make it as boolen with value YES

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