In-App Purchases | raywenderlich.com

Updated for 2019! In-app purchase offers additional revenue streams for developers other than the initial purchase from the App Store. This can be great for unlocking functionality, providing additional content or for in-game currency. Covering the dance with iTunes connect, integration with StoreKit, restoration of previous purchases and receipt validation, by the end of the series you’ll have a great understanding of the concepts behind IAP.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1304447-in-app-purchases

Where are the downloads for the tutorial? I can’t find them.

@akami_channel You can download the materials for each episode using the Download Materials button. I hope it helps!

Can I ask whether the tutorial is compatible with Swift UI and IOS 13? Also, does it answer the question as to how to source the digital product (say a PDF of a magazine stored somewhere). If not, could you give me some guidance on that?

Thank you very much.

Hey there, I haven’t checked the APIs on iOS 13, but this is a pretty mature API and chances are, things are still the same and will work fine. As is, the current course is written specifically for UIKit. When we update the course, we will port it to SwiftUI and only address UIKit whether there’s a specific UIKit issue.

Regarding downloading a PDF, the course doesn’t cover that exact use case. You are probably looking for something like this:

https://developer.apple.com/documentation/storekit/in-app_purchase/unlocking_purchased_content

That said, you’ll learn the API on how to make everything work.

Sorry, can I just be clear then as to whether I can rely on this tutorial even though my App is written in Swift UI. I can include UIKit without any problem?

Many thanks!

You can include UIKit with SwiftUI and vice versa, but the IAP API is ui agnostic. You can create some helper objects and observe them with SwiftUI so this should work fine for you.

thank you - I will have to read up on helper objects because I have no real clue as to what they are yet. I am very much in the early days of learning…! Thank you.

Learning iOS development is like drinking from a never ending fire hose. They key is to take it one step at a time. Feel free to reach out if you get stuck. We’re all in this together.

Cheers!

I was following along until you moved into MasterViewController.swift which of course I do not have. So now I am stuck. Is there a way to continue this discussion off line - I think I need some lessons…

Could you let me know about this. Where do you put the code that you would normally put in the View Controller. In Scene Delegate?

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]