Search code examples
ioswindowsnsdocumentdirectory

How to access documents directory from Windows computer


SCENARIO

Our application is having some difficulty on our clients system. It seems to be crashing upon login but only happens on our client's network, not ours. To troubleshoot this problem I have created a simple logging manager that will log statements to a .txt file and store it in the documents directory of the application. These logs will describe what action the application has taking and prints a line in the logs.

EXAMPLE

enter image description here

QUESTION

Typically I always access the documents directory via Xcode -> Devices -> and downloading the container to view the AppData. But our client is using a Windows machine and Xcode is only available for MAC.

How do I tell our client how to access the logs on their computer in order to then email them back to me?


Solution

  • You may switch on file sharing for your app by setting UIFileSharingEnabled to YES in app's *.plist (see this or this for examples). After that your client will be able to access and extract files from the Documents directory via iTunes.