Skip to content

Fix sending presentedOfferingIdentifier in StoreKit2#2156

Merged
tonidero merged 5 commits into
mainfrom
csdk-546
Dec 15, 2022
Merged

Fix sending presentedOfferingIdentifier in StoreKit2#2156
tonidero merged 5 commits into
mainfrom
csdk-546

Conversation

@tonidero

Copy link
Copy Markdown
Contributor

Description

Fixes CSDK-546

Looks like we were not caching the offeringIdentifier for a productIdentifier when using store kit 2. This should fix that.

@tonidero tonidero added bug pr:fix A bug fix and removed bug labels Dec 15, 2022
@tonidero tonidero marked this pull request as ready for review December 15, 2022 08:02
@tonidero tonidero requested a review from a team December 15, 2022 08:03

@NachoSoto NachoSoto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice find 👍🏻

Just a few style / refactor things.

Comment thread Sources/Purchasing/Purchases/PurchasesOrchestrator.swift Outdated
Comment thread Tests/StoreKitUnitTests/PurchasesOrchestratorTests.swift Outdated
Comment thread Tests/StoreKitUnitTests/PurchasesOrchestratorTests.swift Outdated
Comment thread Sources/Purchasing/Purchases/PurchasesOrchestrator.swift Outdated
Comment thread Sources/Purchasing/Purchases/PurchasesOrchestrator.swift Outdated
let product = try await fetchSk2Product()

_ = try await orchestrator.purchase(sk2Product: product, promotionalOffer: nil)
_ = try await orchestrator.purchase(sk2Product: product, package: nil, promotionalOffer: nil)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍🏻 Good idea testing with nil too.

Comment thread Tests/StoreKitUnitTests/PurchasesOrchestratorTests.swift
Comment thread Tests/StoreKitUnitTests/PurchasesOrchestratorTests.swift Outdated
@tonidero tonidero enabled auto-merge (squash) December 15, 2022 17:25
@tonidero tonidero merged commit 9296088 into main Dec 15, 2022
@tonidero tonidero deleted the csdk-546 branch December 15, 2022 17:30
NachoSoto pushed a commit that referenced this pull request Dec 15, 2022
**This is an automatic release.**

### Bugfixes
* Fix sending presentedOfferingIdentifier in StoreKit2 (#2156) via Toni
Rico (@tonidero)
* `ReceiptFetcher`: throttle receipt refreshing to avoid `StoreKit`
throttle errors (#2146) via NachoSoto (@NachoSoto)
### Other Changes
* Added integration and unit tests to verify observer mode behavior
(#2069) via NachoSoto (@NachoSoto)
* Created `ClockType` and `TestClock` to be able to mock time (#2145)
via NachoSoto (@NachoSoto)
* Extracted `asyncWait` to poll `async` conditions in tests (#2134) via
NachoSoto (@NachoSoto)
* `StoreKitRequestFetcher`: added log when starting/ending requests
(#2151) via NachoSoto (@NachoSoto)
* `CI`: fixed `PurchaseTester` deployment (#2147) via NachoSoto
(@NachoSoto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants