Most basic steps for purchasing/subscribing a user to an IAP
Assuming you know the
Then in your code
and in the
Set Up in iTunesConnect
In iTunesConnect, select the app which you want to add an IAP to.
Click on features and you will see this:
Click the plus. You will then need to select which type of IAP you want to make.
Then you will need to fill out all of the information for your IAP.
If you have any trouble you can consult the IAP Set Up Guide.
Single IAP in Swift 2
After creating an IAP in iTunesConnect:
In the view controller that you want to buy in
and add the relevant delegates
declare a variable with the product id from iTunesConnect
wire a button to a function to purchase the IAP
And here are some helper methods
the delegate methods that must be declared
And then the code to restore a non-consumable in app purchase
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0