1

I have a flash card app that requires in app purchases to get additional flash card packs. I use core data for the flashcards and the in app purchase populate the database with what they purchased. I have run into a wall on how to securely prevent users from downloading the flash card data without purchasing.

The app is designed to work completely offline, but it is okay if the app needs to connect online to something to download the newly purchased flashcard data. Preferably I wanted to avoid the need to create an account, but if that is the only way to achieve what I'm trying to do here, then I'll move into doing that.

Any ideas on what I should look into, or just a link in the right direction would be extremely helpful. I'm still pretty new to Swift, so please keep that in mind. Thanks!

Options I've run through:

1.Add a copy of the database to the project folder, and pre-populate the database with all the flash cards. In-app purchases unlock access to parts of the database they purchased.

Problem: Someone could download the database info pretty easily since it would be included in the project folder to pre-populate it.

2.Include a csv file in the project folder, that would be used to populate the database when user makes in-app purchases.

Problem: same as above. A user can easily access it.

3.Used shared key credentials

I was going to store the data on a server that requires a specific username/password. When the user made an in-app purchase, it would use the password (which would be set as an NSURL) in the code, to download specific data from the server.

Problem: this shared server credential would be in plain text inside the controller. Slightly harder to get than option one or two, but a shared username/password could be acquired and then the content could just be downloaded directly or shared with others.

See issues with this method discussed here and here.

Adam S.
  • 173
  • 3
  • 15
  • 1
    Host the content with Apple https://kitefaster.com/2017/06/14/use-content-hosting-app-purchase-content/ – Paulw11 Apr 22 '18 at 21:26
  • @Paulw11 Thank you for providing that link! I wasn't aware of Apple content hosting. This is definitely an option I'm going to look into. – Adam S. Apr 23 '18 at 01:16

0 Answers0