Is it possible to access File Provider of another iOS app - ios

I'm developing an app that needs to interact with other apps (that are developed by other persons). In order to do that, I wanted to use their File Provider to read and write from that.
I know the group they're using, but I don't know the URL of the File Provider. I need a way to copy some files programmatically.
I tried:
let provider = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.app.ish.iSH")
But it just doesn't work because I don't have the App Group in my App Id.

The iOS apps are sandboxed partly to specifically prevent this kind of thing from happening. Typically we use inter application URLs to communicate between apps. On a standard (non-jailbroken) device I don't believe there's way to read another application's files when you didn't develop that other app and can't control the app group

Related

iOS Storage across Developers

I need to create an integration between my app and apps by another developer. There are several ways to store data for an app, some that allow only your app to access it, some that allow other apps by the same developer to access it. But is there an iOS API that allows you store data publicly on the device so that any other app can access it? This data is not secure and cannot be used maliciously.
May not work for your specific needs, but note you can share documents between apps using UISupportsDocumentBrowser. See also here.
UISupportsDocumentBrowser (Boolean - iOS) Specifies that the app is a document-based app and uses the UIDocumentBrowserViewController class.
If this key is set to YES, the user can set the document browser’s default save location in Settings. Additionally, the local file provider grants access to all the documents in the app’s Documents directory. These documents appear in the Files app, and in a Document Browser. Users can open and edit these document in place.
This key is supported in iOS 11 and later.
This would violate iOS security policies and is therefore not possible on device. The only way to enable this is on a jailbroken device.

Is it possible to take all backed up data without jailbreak from iCloud (public,shared,private) by any app/tool, provided with iCloud credentials?

I am trying to build a mobile monitoring tool/app for iOS without Jailbreak. The only possible way to perfectly access all installed app's content is through iCloudKit.
Also I found Apple's MDM come a little close to this for BYOD devices but yet accessing individual application's data is not possible.
During all this process, I came across some website fonemonitor and phonemonitor (with and without) who claim to do the same without Jail Break.
So here is my question is it possible to take any application's data if we get access to the users iCloud account? Also, are all public, private and shared data accessible via iCloudKit? As the documentation clearly states private data is untouched.
How does app monitoring work for any iOS Devices through these websites. Any lead would actually help!

Avoid the files inside my iOS app to be easily replaceable

My app is an In-house app distributed via MobileIron. It uses Realm for the database, and also SDWebImage for image caching.
I made some tests, with iExplorer today, and I could see that the files are easily replaceable with this tool. This allows me to update the datas how I want, then replace the file on the iPhone, and it's done.
Anyway, it's not the case with the App Store Apps (files are not accessible via iExplorer).
I know I should may be use encryption for the Realm database, but it's more a general problem in this case.
How can I make sure that the files are not manipulated inside my app ?
Once applications are wrapped with the MobileIron AppConnect wrapper they become integrated into the secure container on the device. Each app becomes a secure container whose data is encrypted, protected from unauthorized access, and removable.
This url will give you more details.

Reading Files belonging to other Apps iOS

I am currently coding a backup app for iOS, and I want to have options to let the user back up things like Application Data (other app's documents, etc,) Contacts, Safari Bookmarks, and all that fun stuff.
I'd like to know if that's possible, how I'd do it, and where those files are stored, and most importantly, if this is actually allowed by Apple. I read through their docs, and I haven't seen anything that speaks against it.
It's not possible. Your app isn't even capable of reading the documents from other apps. This is accomplished via sandboxing. Every read/write your application tries to do to the filesystem is checked by the kernel to ensure you're staying within your sandbox. The documents belonging to other apps are outside of your sandbox, so you cannot see them.
They aren't allowed. All iOS apps are sandboxed, and can't access other apps' data.
Your app, naturally is in a sandbox, which does not allow you to read outside of the app. If you jailbreak your device, then yes, it is possible.

How to share data between applications?

I have previously developed on Android but never on iPhone so my question could be stupid for iPhone developers.
Does it exist one or several ways to share data between applications on iPhone ?
In Android, data sharing between applications could be performed thanks to ContentProvider.
I found a post ( How to share custom data between iPhone applications? ) that talks about URL scheme but it seems only usable to share small piece of data.
Your conclusions based on the question you linked to are correct; there's no way for iPhone applications to communicate like on Android. As mentioned, you can send information from one app to another via the URL scheme, or you may share some Keychain information amongst your own apps if you sign them properly.
No - iPhone apps are sandboxed and cannot share information. The few exceptions are that you can access information from some of the Apple apps such as the photo library, calendar, email and contacts.
It depends on what you want to share, if it is contained in a document for example, then if another application supports the document format, then you can impliment a control in your application that will allow you to open it in another app. i think it is a UIDocumentController, or UIDocumentInteractionController.
Im not 100% on the class name but good reader uses this method as does iBook, to open PDF files from another application.

Resources