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
Related
I am developing a mobile app in objective-c for iOS.
Is there a way inside my app to programmatically retrieve the most visited websites from the browsers on the device?
I am interested in the urls specifically (e.g. "http://www.google.com"), in order to check a couple of things.
I've searched online but I haven't find anything that could satisfy these needs: does every browser save this kind of information in a private folder not accessible to anyone else and so it's not possible to get this data? Or am I missing something else?
Thanks anyway for your answers
The answer is: No, it's impossible. Apple doesn't give as an API to do that.
No, the developed applications are sandboxed. You can't access data out of one app from another. It's part of the security model.
Apple didn't published APIs for this privacy access level, It only published the following APIs for Safari extensions:
https://developer.apple.com/documentation/safariservices/safari_app_extensions
BTW, This question is asked alot before, you can check them:
how to programmatically access iphone browser history
How to access iPhone Safari History in an App?
I've been searching for a way that if there's any way that an app can push / pull a message to / from another app, assuming that both apps have been installed. I have a feeling that probably that it is not possible, but would like to confirm with SO.
Basically, I'm going to develop two apps, app1 and app2. Let's assume that a user always downloads both of the apps (or, I've found previous discussions over SO that it is possible for an app to figure out if another target app is installed assume it makes Uri registration.) App1 would generate some information and have to pass to app2. One way to do it is that I can have an external server as a relay, and both apps can talk over network. However, is it possible to pass information locally from an app to another app, just like Service in Android? It would be appreciated if you can give me a keyword or a link. I read it further. Thank you.
Your solution is the App Groups Entitlement.
For files see: https://developer.apple.com/documentation/foundation/filemanager/1412643-containerurl
For NSUserDefaults see: https://developer.apple.com/documentation/foundation/userdefaults#1664611
I have a requirement to remove all API keys and app secrets from the source code of the app we are building. Ideally the keys and app secrets should be sent to the app out of band as a configuration file, through an MDM solution.
Is this possible, and if so how? If not, what is the recommended approach to store this kind of information, such that it cannot be viewed in the source or extracted from the binary?
EDIT: Update
It is possible to send NSUserDefaults to the app via the MDM solution using Managed App Configuration. However, NSUserDefaults is not secure, easily viewed and modified by a casual user.
My plan is to encrypt the NSUserDefaults to prevent this using the common crypto library included in iOS. Is this the best approach to this problem? Should I also be sending a certificate as part of the MDM config?
Any thoughts, comments, and recommendations appreciated before I go too far down this route.
I know it's been a while, but I recently looked into this (not for an MDM application). I don't have any experience with MDM and that may have another solution. The route I chose to go was using CloudKit. It's a 1st party solution, always available whether the user is logged in to iCloud or not and you communicate securely with Apple's servers and only your App can access these keys.
Also depending how you set it up you can easily rotate out keys.
See more info here
I am developing an iOS application and I am integrating the ShareKit 2.0 project. I want to share content via Facebook and Twitter. Both of them require to create an application on their platform. Everything at this point is ok.
The problem is that as the application in under development, we don't want it to be visible by anybody that is not in this project, so we can't publish content on our facebook/twitter accounts visibly for external people.
Facebook supports a sandbox environment where the app admin can allow just certain users to use the application, so only those users will be able to access and view contents related with that app. And I am looking for something similar on Twitter, but I can't find it.
This is a very hard problem, when you don't find out if this is possible or not, because you never know when you should stop looking for the answer and decide it's not possible. So here I am, asking to SO gurus: is there any sandbox environment for Twitter so we can develop and test our applications?
Thank you very much!
Ok, as I received no answer for this question, I will finally deduce that there does not exist such a sandbox environment for Twitter.
However, I "solved" my requirements by setting my testing account in private mode (I didn't know about this because I rarely use Twitter). Right now this will do the trick, but of course it's much worse than the Facebook sandbox environment.
Apparently not:
https://dev.twitter.com/discussions/1238
#episod Taylor Singletary
There are unfortunately no sandboxes for this kind of activity. It's best for automated testing to not actually hit the API but instead to mock it out.
I recommend you just create a dummy account for testing. I don't know any other way.
Have you tried http://twitsandbox.com
twitSandbox is a web application to support creating applications using the Twitter APIs. It actually processes the methods of almost all and you can confirm what kind of response receives.
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.