how to locate the file which is saved in documents folder of the iphone - iphone

I am creating a file pdf in iphone application and it is saved in the documents it work fine on simultor i can also see the files.but how can i see this file when run the app on iphone device is there any way to get the file using itunes or any utility.

You can use Organizer.So example...

You can use itools.
1. Install itools
2. Connect your device with computer and open itools.
3. Go to "Apps" Tab, select your app.
4. Click on "document" icon,your app's document directory is opened.
5. Select the file and click "Export."
I know this is a late answer, but just in case it can help someone.

If you want to transfer a document from your ios app to computer, enable File Sharing in your app. Set the boolean flag “UIFileSharingEnabled” in your info.plist. Now when you connect the device and scroll to the bottom in the Apps page in itunes, there you can see all the files that are in your Documents folder in your app.

Related

Look inside Apps folder

is there a way to navigate inside the folder structure in iPad or iPhone, check what is inside of any app folder? I tried already xcode but can not identify the folders. Thanks...
You can't do it on a real device, but you can have a look on the simulator. Up until iOS 7 each iOS version maintains it's own set of apps under
Library/Application Support/iPhone Simulator/7.1/Applications/
followed by a cryptic number representing your app. Replace 7.1 with another iOS version. To display the Library folder in Finder, click Go from the Finder menu while holding down Option.
Since iOS 8 those locations have moved and are harder to find. See here: http://pinkstone.co.uk/where-is-the-documents-directory-for-the-ios-8-simulator/
Yes, you can use programs like "iExplorer" which let you navigate your device even without jailbroken devices. I often use it to check that my app is correctly creating files according to my coded file structure.
You can see only contents of Documents Directory on Simulator or device. If you want to see documents directory in device then you have to set UIFileSharingEnabled key to YES in your application's Info.plist file. Then you can see it via iTunes app in Mac os x.
There is not way to see bundle contents in application. Just you can see bundle contents in xcode.
Regards.

How to see the result of sqlite database file in firefox plugin when the app is run on iPhone device

I am using sqlite database in my app. When I run the application from simulator then I am able to see the result in firefox sqlite plugin in my .sqlite file. But when I run on real device then I am not able to see the result so can you tell me how can I see the result and from where I can get that sqlite file.
Short and Simple answer is "You Can't"
When you run on Simulator the generated applicationa nd Document files can be accessed in Library so you can easily check the sqlite file But
When you run on real device the sqlite file is in the document directory inside the device. and Apple does not allow to access the directory from device directly.
1)Enable Application supports iTunes file sharing when editing the info.plist file in Xcode
2)Connect your device to system then open iTunes then click device(such as iPad) then click apps in that you can see file sharing choose your app from that now you can see your sqlite file download that and open using firefox
If you are using Xcode version 6.1 the devices list has moved out of the Organizer. I was able to view the files for my app by:
Clicking Window->Devices and selecting my attached device on the left.
Highlight the application I wanted to view.
Click the settings gear icon below the list and select Download Container.
You are asked where you would like to save the container archive.
In Finder, left click the container archive and select view Show Package Contents.
Navigate to the file/folder you want to view.

What is the simplest way to get log files off of an iPhone?

I have logged my NSLog statements to a file in my iPhone app.
What is the simplest way to grab this data off the phone?
Is there a way to copy the file from Xcode's organizer or some other GUI interface/CLI utility like that or do I need to grab the contents of the file programmatically?
Using the Xcode Organizer, you can "Download" all of your app's files.
1) Open the Organizer.
2) Connect your device.
3) Select "Applications" under that device.
4) Click the Download button for the application.
5) Save the folder to your Desktop.
Your app's Documents folder will be in the folder that you save, along with the Library and tmp folders for that app.
inside of Xcode (in the organizer) you can click your application, expand it and copy the logs to your local machine
As the file is in your apps docs folder you can switch on iTunes filesharing in your plist
UIFileSharingEnabled
and copy it off the device via the iTunes interface.

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

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 can browse the document directory of your app with Finder)
Can this be done for device?
Thank you
In Xcode 6 you should open Devices window to download it.
You can open Organizer in Xcode and download the documents directory when your device is connected right ?
I'm going to combine the two solutions together and add screenshots for clarity. This is with Xcode 7.
View/Download App Documents
Open the Devices window through the menu Window -> Devices.
Select your device.
Select your application.
Click the gear button for the options.
View/Download/Delete Documents through iTunes
IMPORTANT!!!
If you have documents within a subfolder, you will not be able to see or change them through iTunes.
Select the Info.plist file in the Project navigator.
Click the + button next to any property to add another.
Scroll down the list or type to find Application supports iTunes file sharing.
Change boolean value to YES.
Re-build/install application.
Hi Viraj's anwer is the way to go .Here is a screenshot:
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:
Add the UIFileSharingEnabled key to your application’s Info.plist file and set the value of the key to YES.
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.
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
With MacOS Catalina, Apple has made it very easy for reading the files written from the Documents directory.
Here are the steps:
Once the device is connected to the Mac, it should be listed under the 'Locations' section in Finder as follows:
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
One way can be to use iExplorer
Download link iExplorer

iTunes Documents Directory in my app

how can I setup my app to accept documents via iTunes, like the Air Sharing or VLC app?
I mean, I want to allow users to get content from the app using iTunes.
Anyone know how?
Thanks
Copied from http://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS3_2.html#//apple_ref/doc/uid/TP40009337-SW11.
To enable file sharing for your application, do the following:
Add the UIFileSharingEnabled key to your application’s Info.plist file and set the value of the key to YES.
Put whatever files you want to share in your application’s Documents directory.
When the device is plugged into the user’s computer, iTunes displays a File Sharing section in the Apps tab of the selected device.
The user can add files to this directory or move files to the desktop.