Adding In-App Purchases, Sandbox Users, & Restoring Purchases (Swift 5)

Опубликовано: 11 Март 2019
на канале: Mobile App Mike
10,542
159

This is a compilation of 3 of my videos on In-App Purchases. Since it's all using the same app and on the same topic, I figured I would combine the 3. To see them separately, check out the playlist that this video is in.

In this video, we go over how to add in-app purchases to your iOS app using the Swift language. The steps are as follows:
1) Create Apple Developer Account
2) Register App on Developer Website
3) Add App on App Store Connect
4) Enable In-App Purchases in Xcode
5) Create let constant for Product ID
6) Import StoreKit & Add SKPaymentTransaction Protocol
7) Add Self as PaymentQueue
8) Create payment transaction method
9) Check if user can make payments
10) Add payment request method

Afterwards, we create a sandbox user to test our In-App Purchase, and we restore In-App Purchases, which is a feature required by Apple.

Please keep in mind you MUST have a developer account with Apple to do in-app purchases. This costs $99/year.

Download the completed project here: https://github.com/mgm720/InAppPurcha...

Follow me on Twitter!   / milesoftweets