2

Is there any way to work with data in shared web credentials directly, like with keychain, without showing popups on SecAddSharedWebCredential and SecRequestSharedWebCredential?

Or are there any other methods to work with it?

I want to share some data (string) between apps with different development teams.

AntiVIRUZ
  • 342
  • 1
  • 14
  • Do you want to send data from App1 (Developer 1) to App2 (Developer 2) without Web API or Safari only using the iOS keychain? – Ladd.c Sep 29 '19 at 00:57
  • I want to do that without additional user actions or opening app2 from app1 applications. I know that it's possible – Instagram does this somehow when you authorize with facebook there. But it uses an internet connection: it doesn't work without it. – AntiVIRUZ Sep 30 '19 at 06:18
  • Yes, is possible without internet connection using the Keychain functionality. Let me try an example. – Ladd.c Sep 30 '19 at 16:05

2 Answers2

0

I will recommend you to use the KeychainAccess which is a simple swift wrapper. And using Keychain is the best way to store small pieces of data that are critical to your app, like secrets and passwords.

Also the tutorial from raywenderlich would help you use the Keychain Services API.

Sreeram Nair
  • 2,369
  • 12
  • 27
0

App groups can be an option for your use case. Read below the apple API documentation and medium post

App Groups Use a shared app group to share data/files between two/more apps or containing apps. An app group creates a secure container that multiple processes can access. Normally, each process runs in its own sandbox environment, but an app group lets both processes share a common directory.

Apple API docs - https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups

https://medium.com/@dinesh.kachhot/different-ways-to-share-data-between-apps-de75a0a46d4a

Also here is another stackoverflow post answering similar question - Communicating and persisting data between apps with App Groups

Haseeb Afsar
  • 619
  • 5
  • 7
  • I cannot add two apps from different teams in one group. Xcode says, that I cannot take this group name when I try to add the second app in existing group – AntiVIRUZ Oct 01 '19 at 08:09