Prevent unauthorized access to application data

I am trying to limit an unpaid user to creating and saving a single document until they pay to unlock premium features. Is there any way to store a secure file or something in a registry somewhere in a manner that prevents the user from altering it?


The app will run on macOS, iOS.

Replies

One way to prevent alteration by user is to add a signature (hash) to the file (may be another data on plist.


You use this signature to check the registry is valid : on app opening, recompute the signature and check if it matches the stored one.

You use the registry as a check wether or not user is allowed access to some functionalities.


You can compute this signature with a propietary formula ; if user modifies the original registry, it will not match the stored signature.