0

My goal: Synchronize settings between two different of my apps on two different devices of the user.

From what I can tell, I can

  • use App Groups to share settings between different apps on the same device or
  • use iCloud to share settings of the same app across different devices.

Is there an easy way to achieve both?

I am aware that I could use iCloud Documents and probably store the settings as a document in iCloud. However, I don't want the user to be able to change those settings externally, which would be possible with iCloud Documents, I assume.

Community
  • 1
  • 1
Frank Rupprecht
  • 9,191
  • 31
  • 56

1 Answers1

1

If user have Keychain enabled on devices, you can store data in it and it will be synced across all devices which use same keychain (in most cases they linked to user's iCloud account)

Serhii Mamontov
  • 4,942
  • 22
  • 26
  • But can I access the same data from two different apps? – Frank Rupprecht Nov 23 '15 at 12:05
  • If you will configure access group for keychain and will used it for provisioning profiles on all your applications - yes, you will be able to get access to it. – Serhii Mamontov Nov 23 '15 at 12:53
  • Nice, that seems like a good solution, thanks! One more question: If the user didn't enable iCloud Keychain, would I still get the sync on the same device? – Frank Rupprecht Nov 23 '15 at 12:56
  • If iCloud Keychain not enabled, data which generated on this device will be only on it and won't be synced with other user devices (but will be part of backup on user's computer, if stored item configured to). Keychain items still will be accessible by other your applications if they have same access group. – Serhii Mamontov Nov 23 '15 at 13:01