Skip to content

xrOS: added support for new purchase(confirmIn:options:) method#2683

Merged
NachoSoto merged 2 commits into
mainfrom
xros-purchase-scene
Jun 22, 2023
Merged

xrOS: added support for new purchase(confirmIn:options:) method#2683
NachoSoto merged 2 commits into
mainfrom
xros-purchase-scene

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

No description provided.

@NachoSoto NachoSoto added pr:fix A bug fix xrOS labels Jun 21, 2023
@NachoSoto NachoSoto requested a review from a team June 21, 2023 21:48
Comment thread Sources/Error Handling/ErrorUtils.swift Outdated
@NachoSoto NachoSoto force-pushed the xros-purchase-scene branch from ce72303 to 4e24085 Compare June 21, 2023 21:50
NachoSoto added a commit that referenced this pull request Jun 21, 2023
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`.
@NachoSoto NachoSoto force-pushed the xros-purchase-scene branch 2 times, most recently from ab62739 to 9d5585e Compare June 21, 2023 22:51
Comment on lines 462 to 463

Copy link
Copy Markdown
Contributor Author

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.

@NachoSoto NachoSoto force-pushed the xros-purchase-scene branch 2 times, most recently from 1d943fe to d5e19a9 Compare June 21, 2023 23:25
@NachoSoto NachoSoto force-pushed the xros-purchase-scene branch from d5e19a9 to ed69013 Compare June 21, 2023 23:53
Comment on lines +509 to +510
// Note: this can be simplified as `#if swift(>=5.9) && os(xrOS)`
// once we drop support for Xcode 13.x

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

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

codecov Bot commented Jun 22, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2683 (9485463) into main (7298dfa) will increase coverage by 0.00%.
The diff coverage is 96.29%.

@@           Coverage Diff           @@
##             main    #2683   +/-   ##
=======================================
  Coverage   86.56%   86.57%           
=======================================
  Files         208      208           
  Lines       14801    14818   +17     
=======================================
+ Hits        12813    12829   +16     
- Misses       1988     1989    +1     
Impacted Files Coverage Δ
...ndationExtensions/UIApplication+RCExtensions.swift 93.33% <ø> (ø)
...s/Logging/Strings/ManageSubscriptionsStrings.swift 80.00% <ø> (+3.52%) ⬆️
Sources/Support/ManageSubscriptionsHelper.swift 69.69% <83.33%> (+1.65%) ⬆️
Sources/Misc/SystemInfo.swift 98.38% <100.00%> (+0.06%) ⬆️
...s/Purchasing/Purchases/PurchasesOrchestrator.swift 86.28% <100.00%> (+0.21%) ⬆️
Sources/Support/BeginRefundRequestHelper.swift 95.83% <100.00%> (+1.23%) ⬆️

... and 2 files with indirect coverage changes

@NachoSoto

NachoSoto commented Jun 22, 2023

Copy link
Copy Markdown
Contributor Author

Confirmed this works :)

@NachoSoto NachoSoto merged commit 4ab9d73 into main Jun 22, 2023
@NachoSoto NachoSoto deleted the xros-purchase-scene branch June 22, 2023 14:31
NachoSoto added a commit that referenced this pull request Jun 22, 2023
This was missing in #2683, these methods need to be invoked from the `@MainActor`.
NachoSoto added a commit that referenced this pull request Jun 22, 2023
### Dependencies:

- #2680
- #2681
- #2683

### Future changes:
- [x] Enable for `PurchaseTester`: #2685
- [ ] Build this target in `CI`
- [ ] Run tests on `xrOS`
NachoSoto added a commit that referenced this pull request Jun 22, 2023
This was missing in #2683, these methods need to be invoked from the
`@MainActor`.
NachoSoto pushed a commit that referenced this pull request Jun 22, 2023
**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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants