Where does iPad app store data? - ios

I have an iPad app that downloads PDF and audio files. I though these might be in the .ipa file (I used this thread ipad - extract images from application?) but I didn't see anything there.
Is there some way to find where these might be stored on a Mac (after syncing)?

Normally in many apps the media files will be downloaded to documents directory of app, which is inside the sandbox for the app. Simply telling when you instal a app OS will create a sand box, and all the data will be inside this sand box and only that particular app will have access to this data. So you will not be able to copy data.
Hope this answers your question.

The IPA is an application only. Once it is installed on your iPad, it becomes a "package". It does contain the data within that package with some apps that store locally. There is no Apple supported way to get to this data directly. Think of it like this. The IPA is kind of like a blueprint for a program. Like a blueprint for a shelf, I could build the shelf but the books wouldn't be stored in the blueprint. Only the shelf. When you install the app, the iPad builds your "shelf".

Related

How do I access ipa files from an iPad?

I want to inspect one of the applications that I have downloaded from the iPad app store on my iPad 15.
I assume that it comes with an ipa file.
To locate the app folder or any ipa file, I open the "Files" app and enter "ipa".
Nothing is found.
Are these files hidden from the user?
How do I access / find them?
Thank you!
ps: The app is only available on the iPad app store, not for Mac.
ps2: I know that this board does not fit 100%.
However, I don't see which other board might fit.
ps3:
When I search for "How do I access files on an iPad", I find hundreds of entries explaining how to find documents that the user has created on an iPad, but not where the apps themselves are stored.
AppStore hides this information due to security reasons, so you would not be able to access or locate the ipa file so one would be prevented performing reverse engineering or any other ways to violate the security and data that app provides.

Any ideas on how to batch delete iPhone albums from photo library?

Problem: I have a friend's iPhone that I am working with who had some 3rd party Canon app that created an overwhelming amount of "Albums" (5848499495 of them to be exact!!).
Refer to this video
Obviously, this definitely shouldn't happen and we're trying to see what's the best way to delete all of them.
I was thinking of accessing the files via SSH on the iPhone to see if these "Albums" are represented as directories somewhere in the iPhone's file structure and run some type of shell script to batch remove files as we would on our Macs but I realize that this will require some jailbreaking which we're trying to avoid doing if possible. But will consider it if it's easier to do it that way.
I also tried to see if there were Command Line tools for the iPhone to directly access the root folder to see if we could find the directory but I realize that there are permission issues associated with accessing the iPhone's files without jailbreaking.
These albums are stored locally on the phone, and it's not in iCloud. We tried to see if these folders show up on Mac's photo app after syncing but because they are empty folders, it doesn't show on the app.
Note: we're on a Mac, and the model is an iPhone X running the latest iOS 14.
I'm all out of ideas and any help would be wonderful.
Thanks!

iOS File Retrieval - NSDocumentDirectory

I am working on a library with a very verbose logger module that, on iOS, writes xml logs to NSDocumentDirectory in a consistent file tree. I want to come up with a way for the user of this library to easily access these logs.
I know it is simple to programatically retrieve files from this directory, but is it possible to access this directory on an iOS physical device in any way from outside Xcode to retrieve these logs? I feel like I have seen it somewhere before, something in the manner of extracting the .ipa file and going into the package contents, but I could be wrong.
---------------------------------------------------------EDIT------------------------------------------------------------------
This (Browse the files created on a device by the IOS application I'm developing, on workstation?) is how to do it with Xcode on a device, but I have to assume that there is some way we can create that gets the logs off of a device for a user.
is it possible to access this directory on an iOS physical device in any way from outside Xcode to retrieve these logs?
It is possible to expose the Documents directory by enabling iTunes file sharing. When file sharing is enabled through this method, the contents of Documents directory would be visible to the user in iTunes, which can also be exported. The documents would also be visible for export through some third party desktop apps like iExplorer.
Here is the link to Apple documentation. You may also refer this thread to understand how this is done.
If you're using a simulator (apparently your task doesn't seem to need te real device) you are in luck.
You should go to a folder similar to this one:
/Users/[YOUR_USER_NAME]/Library/Developer/CoreSimulator/Devices/[RANDOM_HASH_YOU_SHOULD_DISCOVER]/data/Containers/Data/Application/[RANDOM_HASH_2_YOU_SHOULD_ALSO_DISCOVER]
Once there, with finder, you'll get the "documents" folder of the simulator and the app you're trying to retrieve your logs from.
You might say: I don't know which 2 RANDOM_HASHES should I go to.
Yes, you're right. If you have MANY simulators installed and or being used, it might be tricky to discover which one is the one you're trying to debug.
The same thing with your APP, your app will live in another RANDOM_HASH folder, and you should browse them, one by one, and then discover your documents folder.
Someone needed to solve this "mess" and created a Xcode Alcatraz Extension that leads you to the exact live simulator and APP you're debugging in any given moment, and then you don't need to guess which 2 random_hash paths you need to navigate to.
If Xcode + Alcartaz plugin extension manager is somewhat out of your reach, you might need to google it. It's not a difficult process.
PS: That magical Alcatraz Extension is named "XCodeWay" (in case you are brave enough to install Alcatraz onto your copy of XCode).
EDIT: Useful link to get Alcatraz: http://alcatraz.io/ Follow its easy instructions and you're done.
EDIT2: If Xcode cannot be used, then the last question in this other thread might come in handy: Browse the files created on a device by the IOS application I'm developing, on workstation?
(Still, an external application in your users machine will be needed )

Retrieve files from iOS app Documents folder via command line

For the project I work on, we have to set up performance metrics. The way we do it is that the simulator writes CSV files to a known location. We then retrieve theses files and make graphs out of it. Piece of cake.
We also have these tests running on the device. In that case, the files are created in the Documents directory.
While I can retrieve these files via the organizer, I'd be much more interested in automating that.
How can I retrieve files from an iPhone app via the command line rather than the organizer?
You can actually access the content of your app from your computer, using https://github.com/phonegap/ios-deploy (originally https://github.com/ghughes/fruitstrap) .
It's as simple as :
./ios-deploy --download=/Documents --bundle_id com.mycompany.myapp -2 dest_dir
You can do much more, like listing the content of the app, debug using lldb etc.
You can use iFuse, as part of libimobiledevice
You can not access the documents folder on your iOS device from your computer without itunes.
I run an webserver within my app so i can download the files via http. For zero configuration setup i use Apples Bonjour.
look here:
https://github.com/robbiehanson/CocoaHTTPServer
https://developer.apple.com/bonjour/

How to copy html files to ipad and then launch in a browser

Here's a crazy question...The client wants a web application to be available on the ipad when not connected to the internet. My first thought was that it would be a great opportunity to use the offline app feature of HTML5, except that the entire web app (including all the media) is 3GB, and apparently all of it must be available. This exceeds the 5MB limit of the app cache. The website does not necessarily have to rely on any dynamic server side code. It can be straight HTML files. Does anyone know if it would be possible to manually copy the entire website onto the ipad and from there easily launch it in a browser? I was not able to do this, but I have to believe there's a way. Any other approaches to this problem that you can think of? Thank you.
I had a similar problem and here's what I found that worked (using an iPad and a PC):
Download (on the PC) the program HTTrack to the PC. This program can create an offline mirror of a website and has all sorts of options for what gets included.
Run HTTrack on the PC and create a folder for your website.
Install (on the iPad) the free App "Documents 5" by Readdle.
Connect Documents 5 to some sort of cloud based storage (I used by Google drive account, but I'm sure Drop Box would work also)
Zip the entire offline website folder mirrored using HTTrack and upload the zip file to cloud storage (Google drive)
Click on the zip file in Documents 5. It should be downloaded to the iPad
Click on the downloaded zip file in Documents 5. It should be automatically extracted.
Now open the extracted folder and click on index.html. This is your website offline.
I don't know if there is a way to move the index link to the home screen...
There are several apps that can be used for storing files on the iPad and viewing them in an embedded browser. I use GoodReader, but this might be overkill for your purpose.
I've been able to view them using FileApp (after transferring via DropBox), but it's far less than ideal.
Use hightail.com, you can link a website as a space, it will actually convert the website to preview image, then can be access on iPad as webpage in browser, no need to copy file to iPad or install any software.

Resources