How safe is Application Support folder? - ios

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.

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.

How safe is to store files into the document directory?

I am writing an iOS app in Swift and Xcode where I allow users to download some files from a server and to store them into the iPhone's document directory.
How safe is it to do so?
Is it possible for a user to access one of these files from outside the app, for example by connecting their phone to a computer, and move them around or share them? If a user has a jailbroken iPhone, could he get a way to access the downloaded files in other ways other than the one I allow within my app?
And if so, should I encrypt my files when I download them?
For jailbroken iPhone i think yes it's possible to access apps directories.
For normal iPhone I'm pretty sure other apps can't access it as all third-party apps are “sandboxed"
https://support.apple.com/en-gb/guide/security/sec15bfe098e/web#:~:text=Sandboxing,information%20stored%20by%20other%20apps.
And no idea about connecting their phone to a computer.

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.

Access to Application Support Directory on the device during development

One can physically access to the app's Document Directory on the device using iTunes File Sharing. What about the Application Support Directory? (The same way if the app is on the simulator)
Anyway one can do this?
Take a look at http://developer.apple.com/library/mac/#recipes/xcode_help-devices_organizer/articles/copy_app_data_from_sandbox.html
This should provide you with a package of all data within the App's sandbox

Is there a way to not erase the documents directory when uninstalling the app?

I'm developing an AIR app for iPad, and I found that when I uninstall the app, the documents directory data gets erased, is there a way to keep this data even when I delete the app or this behavior is regulated by iOS and there is nothing I can do about it?.
Thanks.
No you cant
From The iOS Environment
For security reasons, iOS places each app (including its preferences and data) in a sandbox at install time. A sandbox is a set of fine-grained controls that limit the app’s access to files, preferences, network resources, hardware, and so on. As part of the sandboxing process, the system installs each app in its own sandbox directory, which acts as the home for the app and its data.
So you delete the application all the content regarding that particular app gets deleted.
as soon app get uninstalled the document directory folder also get deleted with that. Although you will not able to access that folder from other apps so there is no need to keep that.

Resources