WWDC24 SALE: Save 50% on all my Swift books and bundles! >>

SwiftUI StoreKit with IOS 17

Forums > Swift

Has anyone implemented StoreKit 2 using the new views available in IOS 17?

Just added code to my app per the example in Tutorial https://www.hackingwithswift.com/quick-start/swiftui/how-to-add-in-app-purchases-in-swiftui.

Planning to add in-App purchases to my app, already in the app store.

I think it is working, still have lots more testing to do, but at the end of tutorial at the link above,

Paul says, "Be careful: that code alone isn’t enough, because one of the possible completion status is pending: the purchase is in the process of happening but hasn’t completed yet, so you still need to watch the transaction queue manually to be absolutely sure of handling the process completely." Where/how do I put the watch the transaction queue code?

But he doesn't say how to do it. I had previously gone through the tutorial from Ultimate Portfolio App, specifically for the inApp purchases, but not sure which if any of those examples still apply.

Any suggestions or pointers would be greatly appreciated.

3      

Hi,

The InApp purchase section of Ultimate Portfolio has recently been updated (for IOS16) the first part has been done, the second part is next to be updated. Could be worthwhile checking that section out, as it changed significantly from the previous version.

Its my understanding that IOS16 uses StoreKit2, but doesn't make use of the new IOS17 views.

3      

@Alee11, Thanks, sounds like the right track, I will check it out, any specification documentation or example that you can point to?

2      

@Alee11, Thanks, sounds like the right track, I will check it out, any specification documentation or example that you can point to?

2      

Save 50% in my WWDC sale.

SAVE 50% To celebrate WWDC24, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.