-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[in_app_purchase] Fix crash iOS sandboxTesting default value #3086
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
@Vardiak Thanks for the fix! Could you add a test for this? In order to make it non-public API change fix, I would recommend to fix it on the OBJC side. We can always allow this value to be null and in the OBJC side, we just take the null value as |
I'm not a OBJC developer, I may be able to help fix it there but I don't know what kind of test you are expecting me to write, since the fix is straightforward. |
|
@Vardiak The test can be "if the I can also take over this fix if you don't feel like learning a bit of OBJC :) However, I'm currently working on some other high priority stuff so it might take some time before I can cycle back to this. |
|
#3110 handles the issue at platform level, which is a better implementation |
Description
Currently, in_app_purchase crashes when initiating a payment if
sandboxTestingofPurchaseParamisnull. But it is actually its default value (contrary to the definition which states that default value is false). In this pull request, the default value is fixed & I added an assert to check if the user didn't pass null explicitly which would cause a crash.Related Issues
flutter/flutter#65767
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?