Avoid other apps using the same framework to access the keychain data in iOS - ios

I have a framework which stores data in Keychain.
Is there a way what can I do to prevent access to that data from other apps in a device which has more apps using the same framework? And can they access it?
I googled a lot but could not find a good answer to this question.
Thanks in advance!

That's the default situation. Each app has its own access group by default, and things put into Keychain are limited to that access group. The framework isn't relevant, only the app ID (and by extension the access group or groups).
For more on access groups, see Sharing Access to Keychain Items Among a Collection of Apps for how apps (from the same development team) can share Keychain items. But the default is that they don't.

Related

Swift 4 Get Keychain Data from Another Project

So I developed an iOS app called Due it a while back, and I had no idea what I was doing at the time. Anyhow, I lost all of the files for it, so i decided to re-create the project, but I stored data in Keychain on the old version. Is there any way that I can get the Keychain data back? (im using the same Bundle Identifier)
I've tried using this: https://stackoverflow.com/a/44310869/4705065 but it doesnt find any data.
Not at this point.
You are able to add multiple applications to a Keychain Access Group within an app, but you would have had to do that within the original app you no longer have access to.
More information on Keychain Access Groups.
It would be a big security concern if anyone could access anything within keychain without explicit permission.

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!

Share data between ios applications

I have to share the login data between two applications, so that in app br.com.companyB.app2 can use the login data of application br.com.companyA.app1 as in this:
I've done a lot of research, and they all lead me to using "apps group". But I've seen that to use this, apps must be on the same developer account, but in my case I have two apps on separate accounts. I also saw that using the API would help me, but I'm looking for a "native" way. Is there any way to share data between these applications?
Unfortunately, app groups are indeed restricted to a single developer team only:
https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW21
As far as I know, there is no native workaround as apps are sandboxed.
If the apps are not on the same developer portal then the answer is no , you can share the data by webServices not locally ,other option is using UIPasteboard with suite but it's neither the right nor the secure way to go

Way to track users between apps?

Let's say I have 3 apps, how can I track users between those apps? I want to see if a user in one app has downloaded a second app of mine and combine that data on the backend. I know I could ask for some sort of identifier (email, phone, etc.), but how can I do that without doing that? I don't think I am allowed to use the IDFA for this, but I'm not 100% sure.
The first thing you should do is check to see if any of your other apps are installed. You should give your apps a custom URL scheme (as posted by #mika) so they can be found. Then check to see if the app exists on the device by checking:
if ([[UIApplication sharedApplication] canOpenURL:yourCustomURLScheme])
To share the data between the apps, configure an app group for your apps.
From the Apple Docs:
Use app groups to allow multiple apps access to shared containers and
allow additional interprocess communication between apps. To enable
app groups, in the Capabilities pane, click the switch in the App
Groups section. You can select existing app groups from the table or
add app groups.
I believe that this would be a simple way of "tracking" them.
You could use Custom URL Scheme to find out what of your apps were installed by a user.
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
Then you can flag you tracking data accordingly.
Google Analytics can be configured to share tracking between apps. https://support.google.com/analytics/answer/2587087?hl=en

Is it possible to access scores of an iOS game application within other iOS application?

I want to access score of user 'A' that he/she secure in Game_Application_1 within Game_Application_2 when user 'B' playing Game_Application_2.
Assuming user A given permission to access thier score.
Both Application developed by different developer.
Please let me know it is possible or not and if possible then how?
Thank you.
This totally depends, if you developing both app then yes. Storing the scores in the keychain can make it accessible to both app.
If you are you are not the developer of both apps then probably no, unless you have access to some kind of API that could tell you the score. Since you can not access data from other app the developers of the other should provide an API to allow you access the score. This can be web based of even using an App URL Scheme.
If both apps are yours you can easily use iCloud's key-value Store to share information.
See Apple's Key-Value Data in iCloud.
See NSHipster's iCloud article.
In ios application you can't access data from out side the application bundle. If you want any information or data from out side the application bundle then you should use API (web services) which contain those information.

Resources