How do I access ipa files from an iPad? - ios

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.

Related

Create a file through a Cordova/Phonegap app that can be opened by another app (ios)?

I'm able to create and save files using cordova-plugin-file, and have been saving and accessing them from within the app to cordova.file.documentsDirectory.
The problem it seems is that all the directories that one can save to are private, Cordova-plugin-file documentation
I would like to be able to have these files saved in (or moved to) the ios blue "files" folder, so that they can be opened by other apps such as Numbers, Pages, etc. It seems so simple there has to be a way to do this, but I can't find it after more than a few evenings of searching and trying different ways.
I'd be grateful if someone could point me in the right direction.
From what I can tell you can save to the documents directory "cordova.file.documentsDirectory". By default this directory is shared with iCloud, so a file saved here could be opened through the ios File folder and a user could then select the files and hit the share icon to open with the appropriate app, such as Numbers etc.
In order to turn on iCloud you have to pay the developer fee to Apple and select the options to do so. I found the article "Working with the Files App in iOS 11" to be helpful in starting this process.
I don't have the paid developer account yet, but from what I'm reading it should work once I activate one. I'm open to a better solution or critique.

iOS, config files and sandboxing

My understanding is that because of sandboxing, it isn't possible to view any text file (ie config file) associated with an iOS app using another app. Something quite simple with Android. Am I mistaken?
I am trying to implement a text config file with a Unity iOS app that gets loaded and parsed once when the application boots.
This config file would also be able to be edited and saved manually on that actual iOS device.
(addendum)
In Unity there is PersistentDataPath which resolves to /var/mobile/Container/Data/Application/foo/Documents
Is there an iOS supported file explorer app that will allow me view and edit files in this location (without jailbreaking)?
Use can check iOS App Groups. It allows multiple apps access to shared containers and allow interprocess communication. There is no so much documentation about this, but maybe that's what you're looking for. At least you can share NSUserDefaults between the apps.
NSUserDefaults it's a most simple way to save any (not big) configurations for your app. For manual editing: if your app on the device signed with developer certificate, you can connect through any iOS supported file explorer app and edit it. But after release, from App Store, your app installed in restricted/private path, so it's not possible, if only you don't have a jailbreak.
Initial configuration you can put into your app bundle, and at the first run just copy them to NSUserDefaults.
Short answer: There are utilities such as iExplorer - https://macroplant.com - that allow "file manager" type access. However...
Long answer: If your app requires users to buy (or get) other software to modify configuration files, the chances of Apple approving it are slim to none.
The appropriate thing to do is to provide a User Interface in your own app which allows the user to modify / update the settings.

How safe is Application Support folder?

Can iOS users access an app's Application Support folder? How safe is this folder?
I'm facing a dilemma between these two options:
Decrypt content (classified as Intellectual Property) and save it in app's Application Support folder in advance when app is installed to get better viewing speeds later;
Keep it encrypted and safe but sacrifice speed.
How safe is the app's Application Support folder? App by the way is coded in Objective C.
No folder is "safe". There are simple apps that let users extract the contents of their device backups made with iTunes. This means that it's trivial to see any file stored by any app on their device.
And there are countless ways to browse an iOS device's files if the iOS device is jailbroken.
So really there is no "safe" folder you can choose to really hide content from a user if the user has the slightest technical ability.
Same for any files bundled in an app. A user can unzip the ipa of any app they've ever installed on any of their iOS devices. All of the ipas are stored on their computer when they backup their device via iTunes.

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 )

Where does iPad app store data?

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".

Resources