-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[in_app_purchase] Fix crash when retrieveReceiptWithError gives an error. #4138
Conversation
I tested and in my case it doesn't crash anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
packages/in_app_purchase/in_app_purchase_ios/ios/Classes/FIAPReceiptManager.m
Outdated
Show resolved
Hide resolved
packages/in_app_purchase/in_app_purchase_ios/example/ios/RunnerTests/Stubs.m
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@cyanglaz @LHLL @stuartmorgan Do you guys have in mind when this PR got merged and a new version is published? I need this fix ASAP and if this needs some more time, I need to add the source branch directly into my pubspec.yaml to fix this issue |
It should land shortly. |
Thanks so much for fixing this! Just to quickly check, how can I know if the changes has landed? |
I'm using "in_app_purchases" package and having the same issue. But seems the solution would be use the "in_app_purchases_ios". Do I have to use both packages? Why can't we have the fix on "in_app_purchase" package it self ? |
Hi @inshaf, No it is not necessary to depend on both packages. The "in_app_purchase" package depends on the "in_app_purchase_ios" package using the Caret syntax (like so: |
Once merged plugins will be published automatically to pub.dev if the submit queue is green. This is done by the "release" workflow that can be monitored here. |
Want to add to @mvanbeusekom that is indeed already published, as you can see on pub.dev: https://pub.dev/packages/in_app_purchase_ios/changelog#0122 |
* upstream_master: (40 commits) [image_picker] Image picker fix camera device (flutter#3898) [flutter_plugin_tools] Improve license-check output (flutter#4154) [webview_flutter] Fix broken keyboard issue link (flutter#3266) [flutter_plugin_tools] Support format on Windows (flutter#4150) [flutter_plugin_tools] Make unit tests pass on Windows (flutter#4149) [image_picker_for_web] Migrate image_picker to package:cross_file (flutter#4083) [various] Prepare plugin repo for binding API improvements (flutter#4148) [quick_actions] Add const constructor (flutter#4131) [in_app_purchase] Add iOS currency symbol to ProductDetails (flutter#4144) [in_app_purchase] Added priceCurrencySymbol to SkuDetailsWrapper (flutter#4114) [image_picker_platform_interface] Add methods that return package:cross_file (flutter#4072) [flutter_plugin_tools] Improve and test 'format' (flutter#4145) [flutter_plugin_tools] Only check target packages in analyze (flutter#4146) [in_app_purchase] Fix crash when retrieveReceiptWithError gives an error. (flutter#4138) [video_player] Pause video when it completes (flutter#3727) [in_app_purchase] Add currencySymbol to ProductDetails (flutter#4115) [in_app_purchase] Add documentation for price change confirmations (flutter#4092) [camera] android-rework part 8: Supporting modules for final implementation (flutter#4054) [plugin_platform_interface] Fix README broken link (flutter#4143) [various] Prepare plugin repo for binding API improvements (flutter#4137) ...
Many thanks @renefloor this really solved my issue! |
It seems like the app is crashing because it can't send
receiptError.userInfo
over the methodchannel in a FlutterError. This PR uses the existing error mapper to parse the error to something that can be send over the methodchannel.Fixes flutter/flutter#85943
Fixes flutter/flutter#85960
Pre-launch Checklist
dart format
.)[shared_preferences]
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.