Skip to content
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

StoreKit 2: only listen to StoreKit.Transaction.updates when SK2 is enabled #3032

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

NachoSoto
Copy link
Contributor

This essentially reverts #2612. This has proven to cause more issues than anything, including duplicate POST receipt requests.

The main reason for #2612 was to support SwiftUI paywalls. This instead adds a warning when attempting to use those without SK2 enabled.

…is enabled

This essentially reverts #2612. This has proven to cause more issues than anything, including duplicate POST receipt requests.

The main reason for #2612 was to support `SwiftUI` paywalls. This instead adds a warning when attempting to use those without SK2.
@NachoSoto NachoSoto enabled auto-merge (squash) August 16, 2023 22:53
@NachoSoto NachoSoto merged commit 1350189 into main Aug 16, 2023
@NachoSoto NachoSoto deleted the stop-listening-to-sk2-on-sk1 branch August 16, 2023 23:04
NachoSoto added a commit that referenced this pull request Aug 17, 2023
Fixes #3028 (comment)
This was wrong in #3032 because `Purchases.storeKit2Setting` is only available in `DEBUG` builds, but we didn't catch it because we have no CI for Xcode 15 yet, which this adds as well.
NachoSoto pushed a commit that referenced this pull request Aug 17, 2023
**This is an automatic release.**

### Bugfixes
* `PurchasesOrchestrator`: fixed callback not invoked regression during
downgrades (#3028) via NachoSoto (@NachoSoto)
* `TransactionPoster`: don't finish transactions for non-subscriptions
if they're not processed (#2841) via NachoSoto (@NachoSoto)
### Performance Improvements
* `StoreKit 2`: only listen to `StoreKit.Transaction.updates` when SK2
is enabled (#3032) via NachoSoto (@NachoSoto)
* `CustomerInfoManager`: post transactions in parallel to POST receipts
only once (#2954) via NachoSoto (@NachoSoto)
### Other Changes
* `PostedTransactionCache`: remove implementation (#3030) via NachoSoto
(@NachoSoto)
* `Integration Tests`: improved `testCanPurchaseMultipleSubscriptions`
(#3025) via NachoSoto (@NachoSoto)
* `GitHub`: improved `ISSUE_TEMPLATE` (#3022) via NachoSoto (@NachoSoto)
* `TransactionPoster`: added transaction ID and Date to log (#3026) via
NachoSoto (@NachoSoto)
* `TransactionPoster`: fix iOS 12 test (#3018) via NachoSoto
(@NachoSoto)
* `SystemInfo`: added `ClockType` (#3014) via NachoSoto (@NachoSoto)
* `Integration Tests`: begin tests with
`UIApplication.willEnterForegroundNotification` to simulate a real app
(#3015) via NachoSoto (@NachoSoto)
* `Integration Tests`: add tests to verify `CustomerInfo`+`Offerings`
request de-dupping (#3013) via NachoSoto (@NachoSoto)
* `SwiftLint`: disable `unneeded_synthesized_initializer` (#3010) via
NachoSoto (@NachoSoto)
* Added `internal`
`NonSubscriptionTransaction.storeTransactionIdentifier` (#3009) via
NachoSoto (@NachoSoto)
* `Integration Tests`: added tests for non-renewing and non-consumable
packages (#3008) via NachoSoto (@NachoSoto)
* Expanded `EnsureNonEmptyArrayDecodable` to
`EnsureNonEmptyCollectionDecodable` (#3002) via NachoSoto (@NachoSoto)
NachoSoto added a commit that referenced this pull request Aug 17, 2023
Fixes
#3028 (comment)
This was wrong in #3032 because `Purchases.storeKit2Setting` is only
available in `DEBUG` builds, but we didn't catch it because we have no
CI for Xcode 15 yet, which this adds as well.
NachoSoto added a commit that referenced this pull request Aug 17, 2023
NachoSoto added a commit to RevenueCat/revenuecat-docs that referenced this pull request Aug 22, 2023
NachoSoto added a commit that referenced this pull request Aug 22, 2023
NachoSoto added a commit to RevenueCat/revenuecat-docs that referenced this pull request Aug 23, 2023
NachoSoto added a commit that referenced this pull request Aug 24, 2023
…g SK2 setting

See also RevenueCat/revenuecat-docs#299.

Since #3032 developers using observer mode need to configure the SDK with the correct StoreKit 2 setting.
This new API makes that explicit, while leaving `with(usesStoreKit2IfAvailable:)` still deprecated.
NachoSoto added a commit that referenced this pull request Aug 29, 2023
…g SK2 setting

See also RevenueCat/revenuecat-docs#299.

Since #3032 developers using observer mode need to configure the SDK with the correct StoreKit 2 setting.
This new API makes that explicit, while leaving `with(usesStoreKit2IfAvailable:)` still deprecated.
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
**This is an automatic release.**

### Bugfixes
* `PurchasesOrchestrator`: fixed callback not invoked regression during
downgrades (#3028) via NachoSoto (@NachoSoto)
* `TransactionPoster`: don't finish transactions for non-subscriptions
if they're not processed (#2841) via NachoSoto (@NachoSoto)
### Performance Improvements
* `StoreKit 2`: only listen to `StoreKit.Transaction.updates` when SK2
is enabled (#3032) via NachoSoto (@NachoSoto)
* `CustomerInfoManager`: post transactions in parallel to POST receipts
only once (#2954) via NachoSoto (@NachoSoto)
### Other Changes
* `PostedTransactionCache`: remove implementation (#3030) via NachoSoto
(@NachoSoto)
* `Integration Tests`: improved `testCanPurchaseMultipleSubscriptions`
(#3025) via NachoSoto (@NachoSoto)
* `GitHub`: improved `ISSUE_TEMPLATE` (#3022) via NachoSoto (@NachoSoto)
* `TransactionPoster`: added transaction ID and Date to log (#3026) via
NachoSoto (@NachoSoto)
* `TransactionPoster`: fix iOS 12 test (#3018) via NachoSoto
(@NachoSoto)
* `SystemInfo`: added `ClockType` (#3014) via NachoSoto (@NachoSoto)
* `Integration Tests`: begin tests with
`UIApplication.willEnterForegroundNotification` to simulate a real app
(#3015) via NachoSoto (@NachoSoto)
* `Integration Tests`: add tests to verify `CustomerInfo`+`Offerings`
request de-dupping (#3013) via NachoSoto (@NachoSoto)
* `SwiftLint`: disable `unneeded_synthesized_initializer` (#3010) via
NachoSoto (@NachoSoto)
* Added `internal`
`NonSubscriptionTransaction.storeTransactionIdentifier` (#3009) via
NachoSoto (@NachoSoto)
* `Integration Tests`: added tests for non-renewing and non-consumable
packages (#3008) via NachoSoto (@NachoSoto)
* Expanded `EnsureNonEmptyArrayDecodable` to
`EnsureNonEmptyCollectionDecodable` (#3002) via NachoSoto (@NachoSoto)
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
Fixes
#3028 (comment)
This was wrong in #3032 because `Purchases.storeKit2Setting` is only
available in `DEBUG` builds, but we didn't catch it because we have no
CI for Xcode 15 yet, which this adds as well.
MarkVillacampa pushed a commit that referenced this pull request Sep 6, 2023
NachoSoto added a commit that referenced this pull request Sep 14, 2023
…g SK2 setting

See also RevenueCat/revenuecat-docs#299.

Since #3032 developers using observer mode need to configure the SDK with the correct StoreKit 2 setting.
This new API makes that explicit, while leaving `with(usesStoreKit2IfAvailable:)` still deprecated.
NachoSoto added a commit that referenced this pull request Sep 15, 2023
…g SK2 setting

See also RevenueCat/revenuecat-docs#299.

Since #3032 developers using observer mode need to configure the SDK with the correct StoreKit 2 setting.
This new API makes that explicit, while leaving `with(usesStoreKit2IfAvailable:)` still deprecated.
NachoSoto added a commit that referenced this pull request Sep 15, 2023
…StoreKit 2

See also RevenueCat/revenuecat-docs#299.

Since #3032 developers using observer mode need to configure the SDK with the correct StoreKit 2 setting.
This new API makes that explicit, while leaving `with(usesStoreKit2IfAvailable:)` still deprecated.
NachoSoto added a commit that referenced this pull request Sep 19, 2023
…StoreKit 2 (#3066)

Since #3032 developers using observer mode need to configure the SDK
with the correct StoreKit 2 setting.

A future API will allow users to sync transactions made with StoreKit2.
@vegaro vegaro added pr:other and removed pr:perf labels Sep 17, 2024
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 86.86%. Comparing base (93883e7) to head (c694e0f).
Report is 835 commits behind head on main.

Files with missing lines Patch % Lines
Sources/Logging/Strings/ConfigureStrings.swift 40.00% 3 Missing ⚠️
...ces/Purchasing/StoreKit1/PaymentQueueWrapper.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3032      +/-   ##
==========================================
+ Coverage   86.77%   86.86%   +0.08%     
==========================================
  Files         220      220              
  Lines       15701    15708       +7     
==========================================
+ Hits        13624    13644      +20     
+ Misses       2077     2064      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants