StoreKit: In App Purchases | Swift 4, Xcode 9

Kilo Loco · 43K views · 2017 · 1:11:17

Open on YouTube

Software (other)Software practice, open source & careerstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the walkthrough they followed to build an IAPService class, and then cite it when asking follow-up questions about purchase status, delivering purchased items, and restoring individual products.

Recommended by 0 people across 0 different months, 2017 to 2018.

What it is

A 71-minute Swift 4 and Xcode 9 tutorial by Kilo Loco on adding In App Purchases with StoreKit. It covers consumables, non-consumables, auto-renewing and non-renewing subscriptions, restoring purchases, and setting up the App ID and sandbox test users in the Apple Developer account.

What people said

Cites E. Huckabee · 2017-10 · Stack Overflow · on “In App Purchases: Give User purchased item after purchase”

this is kind of a two part question that ties into each-other and would not be worth asking seperately First Problem so i just finished a guide tutorial on youtube here [this video] about in-app purchases and he mostly covered the actual payment and restoration of bought items etc. but the one thing he didnt cover that i actually needed was a way to actually give the Buyer (in my case in-game coins) the purchased item here is the file with all the purchase functions and other things import Foundation import StoreKit class IAPService: NSObject { private override init() {} static let shared = IAPService() var products = [SKProduct]() var paymentQueue = SKPaymentQueue.default() func getProducts() {

Cites yaroslavpalamar · 2018-02 · Stack Overflow · on “in-app purchase in Swift with a single product”

For development in app purchase app even in simple way you need to resolve next subtasks which not relate to coding: Register as developer and creating an App ID under [LINK] select Certificates, IDs & Profiles. select Identifiers > App IDs, and click + to create a new App ID. make sure that In-App Purchase is enabled for your App ID. Fill out the agreement and bank info. For that login to [LINK] Important step - double check the Agreements, Tax, and Banking section. All of them should be filled out. In other case in app purchase will not work. You will get failed response from the server. Creating an App in iTunes Connect. For that just click to My Apps button under [LINK] Creating In-App P

Cites SwiftyLifestyle · 2018-09 · Stack Overflow · on “Storekit: How to check if the product is purchased or not?”

I think everyone knows that Apple In-App Purchases are a little bit difficult thing to implement. (Especially for Swift newbies). Anyway, I tried to learn working with it. Maybe it's better to say that I followed the tutorial Kilo Loco made on YouTube. Here [this video] I did everything what he did and it's working but it's obvious that I don't understand everything yet. My question is.. how to check if the customer already purchased it or not? Maybe there's some kind of status? Then I would just write something like that: if(status=="purchased") { // I would do something what premium user can do. } I know it's not really clear but I guess who have more experience in it can help me to understand

Cites SwiftyLifestyle · 2018-09 · Stack Overflow · on “In-App Purchase - How to restore only one product”

My question is about StoreKit. If I have more than one in-app purchase is it possible to restore only ONE product? Because now when I click I get all of the possible in-app purchases even if I bought only one of them. I'm using the code by Kilo Loco. [this video] class IAPService: NSObject { private override init() {} static let shared = IAPService() var products = [SKProduct]() let paymentQueue = SKPaymentQueue.default() func getProducts() { let products: Set = [IAPProducts.nonConsumable.rawValue, IAPProducts.nonConsumable2.rawValue] let request = SKProductsRequest(productIdentifiers: products) request.delegate = self request.start() paymentQueue.add(self) } func purchase(product: IAPProducts) {