Check files in Documents, Library or tmp directory on iOS device - ios

I am making on an app and want to get access to the directories that system create automatically when app installed on device. Of course when I use simulator I can find these directories without any problems, but how to open them on device. Maybe via iTunes or maybe Xcode has access to these directories.
The folders are below:
Why I need it:
Because after my app restore some products (iOS simulator does not support StoreKit) I have few records in the tmp folder in SQLite database.

#neilco , it's not necessary to use 3d party tools for this. In Xcode, go to organizer, select the connected device, "applications" tab, select desired application and hit "export" button below. This will export you app to your mac, so you can see your depicted folder structure, files' contents etc.

Take a look at using iExplorer as this allows you to views the folder structure of apps on a device.

Related

How do I find out if an IOS app uses frameworks/framework libraries

How can I figure out if an app in the IOS appstore uses frameworks? I would like to be able to know if it uses frameworks and possible what frameworks are used, without actually downloading the app.
Secondly, how do i figure out the frameworks used if provided the app's ipa file?
Finding out what frameworks an app in the Appstore uses may be a futile process, but it is possible to find them if one has an ipa file. Here is the process:
Convert the ipa file to a zip file by renaming it to ".zip" instead of ".ipa". For example, "test.ipa" should be renamed to "test.zip"
Unzip test.zip using whatever tool you chose.
Navigate to the test/Payload. You should see a ".app" file in that location.
Right-click on the file and select "Show Package Content" in the popup menu.
Expand the frameworks folder to view the frameworks. Files within this folder have the ".dylib" extension.
You need an iOS device like iPhone / iPad / iPod with an AppStore account set up, a macOS device like iMac, Apple Configurator 2 app (AC2).
First of all you have to download / buy the app which you want to analyze on your iOS device then connect this device to the macOS device and launch the AC2 app. Once the app was launched go to account settings and connect to your AppleId account. Next, right click on the device icon and select "Add->Apps..." action. A modal window will present. Select an applications which you would like to analyze and then download those apps.
Once the applications will be downloaded the AC2 app will ask you to select an action. At this moment don't select any action, instead go to location " Open Finder and go to a folder "~/Library/Group Containers/K36BKF7T3D.group.com.apple.configurator/Caches/Assets/TemporaryItems/MobileApps" where are stored downloaded apps.
Last thing is to change the extension of the iPad file to zip, do it with Finder app in menu under right click select option "open archive". Once there, go to payload and frameworks folder which contains all frameworks used by the app.

Is there any way currently to browse an App Folder / App Sandbox on an iOS device with iOS 9

As a developer doing many operations with files in my own apps' sandboxes (An app's subfolder environment such as Documents folder etc.) on the device, I found it extremely useful to be able to browse my app folder to see if my code was writing things to the correct places etc. I always used to use iExplorer for this & it was vital. To my horror, I came to do the same browsing today, only to find that you can no longer look inside the app's folders with tools like iExplorer. Some research tells me that as of iOS 8.3, Apple have placed restrictions which stop these tools from doing the great job they did.
Is there a work-around now at the iOS9 stage or even any tools that still manage to do it? This was so essential as a dev.
I'm assuming you mean a physical device, not the Simulator. In that case, you could open the Devices window (Xcode > Window > Devices) and then select the relevant device on the left.
In the Installed Apps section, select your app, and then click the gear icon which will give you a menu to Show, Download or Replace Container...
Now, it's available FileBrowser to browse the content of an app folder (in its sandbox).

Yosemite, iOS 8 and iCloud drive: syncing mobile to desktop?

I have a couple of iOS 8 apps that make use of the new iCloud Drive service and the native API for copying files to the app's personal iCloud file directory. Using two separate devices, I can upload files on one device, and download it on the other: so far so good. Now, having upgraded my macs to OS X.10 Yosemite, I have the iCloud Drive folder, but it only shows the files from the one applicable Apple product that I ever use (Keynote):
The files that are happily syncing between mobile devices are nowhere to be seen; I'm pretty sure that the documentation implies that they're supposed to be there, and that the distinction between mobile & desktop folders has been taken away. If I hunt around in ~/Library/Mobile\ Devices, I can find them, so they are updating behind the scenes. Or perhaps that update happened when the computer was still running OS X.9 Mavericks.
Anybody know what I'm missing?
On Yosemite it seems Finder is treating iCloud as a special folder, so it doesn't show the hidden files and folders. If you use Terminal to examine ~/Library/Mobile Documents/ it all seems to be there.
Trying to put the full pathname into Finder just dumps you back at the 'official' iCloud view, so it looks like Terminal is required in order to browse these on OS X.
What fixed it for me was going to System Preferences, iCloud, unchecking iCloud Drive, restarting the computer, and then repeating but this time checking iCloud Drive.
I discovered an easy way to view the original Mobile Documents folder without the view switching to the new iCloud Drive view.
Access your hidden Library folder within your User folder. (for example, click the Go menu in Finder while holding down the Option key)
Then select the Mobile Documents folder and create an alias to it (by right clicking)
Now, double-click to open the alias. Presto. This opens the actual Mobile Documents folder.
You will notice that some of the folders names have changed. You will note the iCloud Drive folder is also present.
It may be helpful to use the terminal or another utility to unhide the hidden files in Finder.

Debugging & accessing NSDocumentsDirectory in real device

I have my apps using NSDocumentsDirectory for saving the downloads & offline data on device. From debugging point of view, I was debugging as usual on simulator & was trying to access the path for these downloads & I was able to do that. I have my doubts as :
I am not able to access the location /var/mobile/Applications/SOME-HEX-CODED-PATH/Documents/ via terminal that was shown in the NSDocumentsDirectory paths during debugging on device. Whereas in iOS Simulator I am able to open , read/ write at that location.
I am not able to browse through the /var/mobile directory as it is not listed in the finder, not even as hidden directory.
Is that directory is mounted on runtime ?
Please clarify.
I am not sure to fully understand your question. You want to access, from your laptop, the filesystem of your device?
You are not supposed to do that on a regular device at least. If you want to browse your documents directory do it through the organiser (Window/Organiser) and then "devices" tab and select your device and your app. You will be able to see your sandboxed filesystem in the bottom part and downloaded its content.

Get data from user test on device to mac

I'm doing some user tests of my new iOS app and store some test data in a plist. When I do that in the simulator it is easy to get that file for further analysis on my mac, but how can I easily get it from a real device? This will only be used during testing and will not be part of the final version.
Possible ways I have read about but not tried (in hope to get some directions here first):
E-mail attachment
Enable file transfer to iTunes
Jailbreak (but don't want to)
Currently what I am doing is to NSLog it and copy and paste from Xcode into Excel, but this requires that the device is tethered to my mac.
Any experience or advice on easiest way to get this done?
I sometimes use iPhone Explorer to do this, because the plist file I want is not in my Documents folder. I use it to navigate to the files associated with my app on the device. Just connect your device to your laptop, run iPhone Explorer and then use it to locate the plist file you want and drag and drop it wherever you want.
You can save data from Organizer. Just click on your device and it'll show in right pane. Files from documents folder and possibly other folders can be saved.

Resources