How to Design: how to share data across iOS devices with same account


#1

Hi All,

I have a Design Question please.

I have an Ionic app, and due to Apples policy that all purchases need to be shared across all devises owned by a single user (with the same Apple ID), I am trying to find a simple solution.

Problem

I am using Non-Renewing Subscription purchases, and their restorePurchases function doesn’t return anything. So as you can see, I need to come up with another solution.

So I thought a good idea may be to store the data in the users iCloud, then it will be accessible to all devices for that Apple ID.

I have tried cordova-plugin-icloudkv. Which I test with TestFlight, but it only seems to store the data locally. i.e. When I close the app, the data is no longer there. I have even tried setting the following in my config.xml:

<preference name="BackupWebStorage" value="cloud" />

And enabled iCloud for my App ID:

enter image description here

Questions

  1. Can a TestFlight app not write to a users iCloud?
  2. Is there an alternative way to write to iCloud?
  3. Id there a better design of achieving a way to share data between devices of the same user?

Any help will be greatly appreciated.


#2

Solved:

I needed to set up iCloud on my provisioning profile.

see: