In-App Purchases and Using Server-to-Server Notifications

Description: Learn about the latest updates in StoreKit and dive deep into best practices for using server-to-server notifications to manage your subscribers.

New SKStoreFront, it lets us know what country the user is from, we can use it to sell targeted things to that user.

if let sf = SKPaymentQueue.default().storefront { 
  ...
}

It can be nil (the presenter didn’t say how/why).

Use this to observe changes (e.g. when the user change store/account)

//MARK: - SKPaymentTransactionObserver methods 

func paymentQueueDidChangeStorefront(_ queue: SKPaymentQueue) { 
  ...
}

Missing anything? Corrections? Contributions are welcome 😃

Related

Written by

Federico Zanetello

Federico Zanetello

iOS Engineer with strong passion for Swift, minimalism, and design. When he’s not busy automating things, he can be found writing at FIVE STARS and/or playing with the latest shiny toys.