Hi everybody, How are you today?
I’m building an app that allows people to play sounds. Some sounds are premium and some aren’t.
I get the sounds from a database and then save them to CoreData so they won’t need to get fetched every time a user opens the app, but only when there’s an update in the database.
Here are my problems:
Each sound has a flag “isPremium” and if a sound is a premium sound, it allows only premium users to play it. If I save the sounds to core data then a user can alter that flag and effectively make all sounds, not premium. How can I prevent this?
Another problem is the audio file itself. I save the audio file of each sound to the device using FileManager, which means a user can get the audio file if they wanted to. From what I understand there is a way to restrict user access to certain directories: https://apple.co/2XrhvuJ But is it enough?
I’m completely open to suggestions.
Thanks! 😊
Selecting any option will automatically load the page