RevenueCat / purchases-flutter

Flutter plugin for in-app purchases and subscriptions. Supports iOS, macOS and Android.
https://www.revenuecat.com/
MIT License
594 stars 160 forks source link

iOS simulator checkoutl #887

Open TimmyHung opened 7 months ago

TimmyHung commented 7 months ago

‼️ Required data ‼️

Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!

Environment

Describe the bug

I have follow the weather change example to create my own paywall.In Android Simulator everything works fine without any issue, but in iOS Simulator when I tried to call out customerInfo = await Purchases.purchasePackage(widget.offering.availablePackages[_selectedIndex]); I have to wait roughly 5 seconds to see checkout screen. And after I successfully send the payment in sandbox environment my code stucked, and another checkout screen appeared.So it is imposible to check if a user has checkout successfully. I have record a video (https://streamable.com/q4vhpm).

Additional context ##=

RCGitBot commented 7 months ago

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

codykerns commented 7 months ago

Hey @TimmyHung, unfortunately in sandbox mode it's expected that it may take several seconds to see the Apple system payment dialog. When calling purchase, I'd recommend displaying an activity indicator showing the customer that something is happening in the background while the sheet loads. Once the payment completes, you can dismiss the indicator.

It seems like you are having another issue where you aren't seeing callbacks after the purchase completes - unfortunately, we'll need debug logs to investigate further. I'd recommend following our guide to getting debug logs enabled, and please send over the logs from app launch through when you've made the purchase: https://docs.revenuecat.com/docs/debugging

TimmyHung commented 7 months ago

Hmm it kinda weird. I can receive callbacks after the purchase complete in real device(TestFlight not sandbox). I also enable the debug log but I can't see any debug log, OS_ACTIVITY_MODE is not disabled. https://streamable.com/rsqhwx

Lazizbek97 commented 7 months ago

any news? Purchases.purchasePackage(package) compileted successfully in my case, but not returning anything. repeating payment screen again and again

codykerns commented 7 months ago

@TimmyHung can you try running the app from Xcode directly to see logs?

@Lazizbek97 it sounds like you might be experiencing a different issue. I'd recommend opening a support ticket instead of here: https://www.revenuecat.com/docs/support-first-steps

TimmyHung commented 7 months ago

@codykerns sure! here is the debug logs from Xcode directly(https://streamable.com/ze6xkk). same source code as previous video.

NachoSoto commented 7 months ago

Are you using a StoreKit config file on the simulator? Note that this is required. You can read more in our docs: https://www.revenuecat.com/docs/apple-app-store

saulvh commented 6 months ago

I'm having the exact same issue. Did you find a fix yet? @TimmyHung

pj-hire commented 5 months ago

I'm having the exact same issue as well.