Server for buying apps for iPhone

My company wants to introduce a large-scale In-App purchase model for an iPhone application. Our biggest problem is that we don’t want to go with a service like Urban Airship, because it does not integrate very well with our business model and the nature of the application itself.

So, now we are going to set up our own server to handle communication with In-App purchases, as well as to serve downloaded content. We will not unblock content that already exists in the application, and will download relatively large additional content.

Are there any good resources for more information about the server-side component. I am very familiar with how StoreKit works, but server-side communication is a mystery to me.

Any help would be greatly appreciated!

+4
source share
1 answer

I implemented this by simply downloading the plist + zip file for the purchased content. Plist has a list of products available in it. There is a plist file for each version of the application, since in my case there are sometimes differences in the content based on the version that the user has.

This scheme also supports versioning of individual content items, because sometimes you want to change one of the items in your repository.

I DO NOT follow the Apple Buy-Then-Download Guide. I download-buy-unlock. I'm too nervous because someone buys content and then has to wait for it to load. (My content files are pretty big).

Here's how it works:

  • App downloads .plist for itself. (MyApp_2.1.plist)
  • Opens .plist, checks which version of each content item it has. Let's say the application currently has version 1 of content A and version 5 of content B. The plist file above tells it that the current store should have version 1 of A, version 6 of B and version 7 C. So the application downloads the content for B and C.
  • Content is stored in a zip file. In my case, these are game levels with XML files, audio and graphic content. There is also a .plist with metadata for this game level, which includes the version number and AppStore identifier for this element. The application unpacks the content, and then presents it in the storefront as a locked item. If the user has already purchased it, they automatically receive updated content. If they buy it, I will unlock the contents at that time.

It is simple, can be done with any CMS (even on a regular file web server) and supports multiple versions of content in several versions of your application.

If you want to see the user interface, the application for which I did this is a game called Lexitect, you can see how all this is combined in terms of the user interface. (It's free)

+4
source

Source: https://habr.com/ru/post/1316046/


All Articles