Look inside Apps folder - iphone

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.

Related

Reading iPhone files from PC / Mac programmatically

Applications like iPhone Explorer can show the contents for each installed iPhone application on Mac OS X (even on non-jailbroken devices) when iPhone is connected using USB-cable. I'm trying to do something similar, programmatically copy some files from my iPhone app's folder.
I have done some experiments with open-source frameworks/products built to use iTunes-framework, like iPhoneBrowser and MobileDevice Library. I can connect to iPhone, now the problem is how to enumerate Apps folder items? iPhoneBrowser or MobileDevice Library don't support or provide any easy way for that. Even when hardcoding my application path to iPhoneBrowser it still refuses to display the folder. iPhone Explorer can read the folder without any trouble on the very same device, so it is definitely possible.
Second problem is getting path to apps, on each device they have different path with some hash number folder names. How to 'decrypt' the paths so that I can access my app folder on every device?
the app enumerate use another protocol, you may find some in this https://github.com/phildrip/fruitstrap
I wrote a open source program that works on Windows, here is the github project url:
https://github.com/Moligaloo/iPhoneFS
It can access files on jailbroken iPhone/iPod/iPad (non-jailbroken devices files are limited accessible).
It can also enumerate apps on iDevice.

Looking into app folders inside iPhone device

Is there any way I can see the folder stricture for my app inside iPhone? I have installed a app in my iPhone and have dumped a file inside documents directory. I wanted to see what all data I have in this folder. Is it somehow possible?
use the Xcode organizer.

(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

iOS Question. Can I distribute the Xcode simulator versions of my app?

I would like to send someone the Xcode simulator version - not the device version - of my iPad app. I have located the .app file in the Finder. Do I just zip it up and send it off or is it more complicated than that?
Thanks,
Doug
UPDATE
Chrisbtoo got the answer on this one however he left of some critical bits for those of you trying this at home:
Path to Xcode simulator (the simulator can be run standalone.):
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
Path to app that appears in the home screen of the simulator:
/Users/turner/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID}
It is instructive to watch what happens in the app simulator directory as you build for simulation, delete apps from the simulator desktop and generally use the simulator as an actual device.
Bottom line: This is a viable approach for sharing apps in a "simulated" ad hoc manner without the mind numbing, soul sucking process of true ad hoc app sharing.
Cheers,
Doug
Assuming the other person already has the simulator installed, you can just zip up the stuff under ~/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID} (includes both the .app and any data directories needed) and send it to them - they'll need to unzip it under that same directory. What I've done in the past was to rename the {GUID} part to a more friendly name - the sim will still pick it up.
If they don't already have the simulator, they will need to sign up for a free iphone dev account and download Xcode, etc.
We just put up a little tool that will help you with this. It manages both what you need on the dev side and also the tester.
Here it is
http://blog.placeit.net/ios-app-packager/
It basically creates a little zip that you can pass to the tester and it'll install the app in the right directory and also open it up for the user with the right device selected.
I would think you want to send the entire project folder to the other person- presumably you are expecting them to open it in their XCode- and presumably they have the sdk for the app.
You have to distribute via AdHoc or App Store for beta testing.
Become a developer and then look into how to do this.
You need to have a provisioning profile, and then select the UDID's for the device you want to beta test to.
Go to the iPhone Provisioning Portal
and here is a document with more detail

Importing AddressBook data into the iPhone Simulator

Is there an easy way to import AddressBook data into the iPhone Simulator?
Right now my only assumption is to manually modify the SQLite files found in the /Library/Application Support/iPhone Simulator/User/Library/AddressBook.
I was looking for the exact solution, and this worked perfectly for me on a non-jailbroken phone. It works by extracting your iPhone address book from an unencrypted backup.
Quit the iOS Simulator
Download iPhone/iPod Touch Backup Extractor
Run it, and select the last option "iOS Files"
Create a folder on your desktop and extract all files to that folder
When complete, go to your extract folder and navigate to Library/AddressBook
Copy both files (AddressBook.sqlitedb and AddressBookImages.sqlitedb) to:
~/Library/Application Support/iPhone Simulator/{SDK}/Library/AddressBook
Run the Contacts application in iOS Simulator
DummyContacts is an application that allows you to add Contacts to AddressBook and can be a handy tool for all iOS devices as well as simulators. DummyContacts is a life saver and pretty easy to setup. One click adds 100 records and one click also removes all 100. It also supports iOS6. So check it out at : https://github.com/Janak-Nirmal/DummyContacts .
Here's a simple app I've made which you can install in the simulator
https://github.com/cristianbica/CBSimulatorSeed
Just sign in to your iCloud account on the simulator and turn "Contacts on" under iCloud. All your contacts, photos etc will appear on the simulator. Obviously, this assumes you are backing up your contacts to iCloud on your iPhone. Hope it helps!
As Marc pointed in his answer https://stackoverflow.com/a/27582281/4598931 for a similar question it can be done just exporting contacts to vCard and drag and drop the generated file to iphone simulator.
or if your iPhone isn't jailbroken, you can extract the sqlite db from a backup using the shell script here: http://0xced.blogspot.com/2009/01/using-your-own-address-book-in-iphone.html
(note you'll need to change the simulator path it copies it to, as in the current SDK it's a bit different due to the addition of the OS version folder - easiest thing would be to just change it to your home directory and copy manually from there)
Right this is the only way i know with a "legit" iPhone
But if you have a jailbroken iPhone, you can download the iPhone AddressBook database with ssh, and replace the simulator one by the iphone one.