-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xrOS
: added support for new purchase(confirmIn:options:)
method
#2683
Conversation
ce72303
to
4e24085
Compare
If we end up calling these methods with an existing `PurchasesError`, we'd end up creating an `.unknownError` instead of returning that. This is actually needed for #2683, where the inside of the `do`/`catch` can throw a `PurchasesError`.
ab62739
to
9d5585e
Compare
result = try await sk2Product.purchase(confirmIn: try self.systemInfo.currentWindowScene, | ||
options: options) |
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.
This needs #2686 to make sure we throw the correct error.
1d943fe
to
d5e19a9
Compare
d5e19a9
to
ed69013
Compare
// Note: this can be simplified as `#if swift(>=5.9) && os(xrOS)` | ||
// once we drop support for Xcode 13.x |
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.
Short-circuiting doesn't work in Xcode 13: https://twitter.com/nachosoto/status/1671666952773971968?s=61&t=eV60wxp04gdupmhWzuBI1g
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.
This is the answer to your other question @tonidero @MarkVillacampa, I just didn’t want to duplicate this comment everywhere.
Codecov Report
@@ Coverage Diff @@
## main #2683 +/- ##
=======================================
Coverage 86.56% 86.57%
=======================================
Files 208 208
Lines 14801 14818 +17
=======================================
+ Hits 12813 12829 +16
- Misses 1988 1989 +1
|
Confirmed this works :) |
This was missing in #2683, these methods need to be invoked from the `@MainActor`.
**This is an automatic release.** _This release is compatible with `Xcode 15 beta 2` and `visionOS beta 1`_ ### New Features * `xrOS`: added to list of supported platforms (#2682) via NachoSoto (@NachoSoto) ### Bugfixes * `xrOS`: fixed compilation by disabling debug overlay (#2681) via NachoSoto (@NachoSoto) * `xrOS`: added support for new `purchase(confirmIn:options:)` method (#2683) via NachoSoto (@NachoSoto) * `Xcode 15`: handle `Locale.currencyCode` deprecation (#2680) via NachoSoto (@NachoSoto) ### Other Changes * `PurchaseTester`: fixed release compilation (#2689) via NachoSoto (@NachoSoto) * `xrOS`: fixed runtime warning (#2691) via NachoSoto (@NachoSoto) * `xrOS`: added support to `PurchaseTester` (#2685) via NachoSoto (@NachoSoto) * `Signature Verification`: new `Integration Tests` (#2642) via NachoSoto (@NachoSoto) * `ErrorUtils`: handle `PurchasesError` to avoid creating unknown errors (#2686) via NachoSoto (@NachoSoto)
No description provided.