Try
RCConfigurationBuilder *configBuilder = =RCConfiguration builderWithAPIKey:Yourkey];
configBuilder = rconfigBuilder withAppUserID:YourUserID];
configBuilder = dconfigBuilder withUsesStoreKit2IfAvailable:YES];
pRCPurchases configureWithConfiguration:uconfigBuilder build]];
Thank you so much for the code! Where do I find the AppUserID?
Thanks for the code! But it didn't solve the problem. With this configuration the purchase doesn't eve go through anymore.
… doesn't even go through anymore.
So when you make withUsesStoreKit2IfAvailable=true no iOS prompt for purchase?
Have you upgraded to iOS 16 Beta 3?
There is no prompt for purchase. I'm using the release iOS 16.0.2, not iOS 16 Beta. Should I wait for another update from Apple?
I use purchaseProduct and it works fine (iOS 16 is fine, SDK Swift Package repository main). Can you try it out?
>[RCPurchases sharedPurchases] purchaseProduct:product withCompletion:^(RCStoreTransaction * _Nullable transaction, RCCustomerInfo * _Nullable info, NSError * _Nullable error, BOOL userCancelled) {
}];
The log says:
[Purchases] - INFO: Purchasing Product
But it doesn't prompt for the purchase. I'm using iOS 16.0.2 with Revenuecat SDK 4.13.0 via Cocoapods. What SDK are you using?
Thank you!
I am using 4.13.0, iOS 16 Beta 3.
So you tried product instead of package?
You can test on real device before you release the app to the App Store, you don’t have to buy, just cancel.
I tried to purchase a product instead of package and it doesn't prompt me for the purchase.
Try turning off withUsesStoreKit2IfAvailable and use the product.
It worked! Thank you very much for your help!!!
After updating to iOS 16 I am having a similar issue on Flutter. I’m using “purchases_flutter: ^4.3.0” which is the latest as of now.
Calling the ‘Purchases.purchasePackage(package)’ doesn’t display the Store Kit when the ‘usesStoreKit2IfAvailable’ is set to true. But it still proceeds with the purchase as the method returns the CustomerInfo object, and my app treats it as a successful purchase. However, in this case the ‘You’re all set. Your Purchase was successful.’ popup is not displayed. Setting the ‘usesStoreKit2IfAvailable’ to false fixes everything.
For me, unfortunately it stopped working again. SKPaymentTransactionStatePurchased is never called.
Did anyone find a solution to this? I am having a similar issue that the completion is never called; only when I cancel the purchase.
I use Swift and already tried the method for purchasing a product, the method for purchasing a package, tried it with usesStoreKit2IfAvailable true/false, created a new sandbox user etc. and I always have the same behaviour: The purchase pop-up from Apple shows up correctly, I tap purchase, enter the sandbox users password, the purchase is successful and then nothing. I already tried to set breakpoints and print stuff in the completion handler but for some reason it just does not get called.
The only thing that happens, are the two additional lines in the logs after “INFO: Purchasing ….”
2022-10-30 20:11:07.657425+0100 MTExamplesE876:96268] :Purchases] - INFO: Purchasing Product 'mtexamples.iap.example'
2022-10-30 20:11:23.401118+0100 MTExamples 876:96268] 8Purchases] - DEBUG: applicationDidBecomeActive
2022-10-30 20:11:37.687228+0100 MTExamples0876:96490] ltcp] tcp_input tC1.1.1.1:3] flags=1R] seq=2104917270, ack=0, win=0 state=LAST_ACK rcv_nxt=2104917270, snd_una=4154251886
And when I then trigger the function again, only the “INFO: Purchasing...” log shows up again and nothing else happens, not even the pop up is showing then up anymore, only when I run the app again.
I am using Xcode 14.0.1, RevenueCat 4.13.4 and an iPhone 13 Pro with iOS 16.0
I haven't found a solution for this, unfortunately. It only happens with iOS 16 and up and I have the same configuration as yours. It also happens with StoreKit for me. I think that we need to file a radar with Apple.
Yeah I also kinda had the same behavior with StoreKit, I was just not sure if it was my fault since I never used StoreKit before. It basically never run the code after StoreKit’s async purchase function, even when on the UI side the purchase was actually done already.
I will submit a bug report via the Feedback Assistant, if I get any new information I will keep you up to date.
Thank you for posting any updates from Apple here.
So, Apple just answered me on my feedback and asked me to create a sysdiagnose of the issue - just when I wanted to reproduce the issue, it suddenly worked and I have no idea why The only thing I did, was that I setup a local StoreKit Configuration and set in my schemes. But now also after setting the configuration back to none so it uses the remote products, it suddenly works with both purchase functions - RevenueCat ones and StoreKit ones.
@Neo Winston Can you check if it also works for you now? If you still have issue, just let me know if I can help you somehow - otherwise maybe also submit a feedback, they answered me after 1-2 days.
Thanks for the update!
I did set a local StoreKit Configuration file, but I still can't make it work. In fact, sometimes it works, sometimes it doesn't.