use transactions.all to observe transactions in observer mode with SK2#2063
Closed
aboedo wants to merge 2 commits into
Closed
use transactions.all to observe transactions in observer mode with SK2#2063aboedo wants to merge 2 commits into
transactions.all to observe transactions in observer mode with SK2#2063aboedo wants to merge 2 commits into
Conversation
Generated by 🚫 Danger |
aboedo
commented
Nov 17, 2022
Comment on lines
43
to
44
Member
Author
There was a problem hiding this comment.
@NachoSoto I can wrap this up tonight if you don't have the time, basically we need to pass in system info or the setting here
8db9225 to
bb57c1a
Compare
bb57c1a to
fde67bd
Compare
Member
Author
|
closing since this isn't needed |
NachoSoto
added a commit
that referenced
this pull request
Nov 28, 2022
I wrote all these to cover the change in #2063. I wrote a failing test that only passed with the change in #2063. However, when running that in SK1, that would fail. With the change as suggested in #2063, the SK2 behavior would differ from SK1. From the `Transaction.all` docs: > This sequence returns the user’s transaction history current to the moment you access the sequence. The sequence emits a finite number of transactions. If the App Store processes new transactions for the user while you’re accessing this sequence, the new transactions appear in the transaction listener, updates. So all these new tests verify the behavior of the SDK when encountering transactions created prior to initializing the SDK. Depends on #2064 and #2066.
NachoSoto
added a commit
that referenced
this pull request
Dec 15, 2022
I wrote all these to cover the change in #2063. I wrote a failing test that only passed with the change in #2063. However, when running that in SK1, that would fail. With the change as suggested in #2063, the SK2 behavior would differ from SK1. From the `Transaction.all` docs: > This sequence returns the user’s transaction history current to the moment you access the sequence. The sequence emits a finite number of transactions. If the App Store processes new transactions for the user while you’re accessing this sequence, the new transactions appear in the transaction listener, updates. So all these new tests verify the behavior of the SDK when encountering transactions created prior to initializing the SDK. Depends on #2064 and #2066.
NachoSoto
added a commit
that referenced
this pull request
Dec 15, 2022
) See [TRIAGE-179]. I wrote all these to cover the change in #2063. I wrote a failing test that only passed with the change in #2063. However, when running that in SK1, that would fail. With the change as suggested in #2063, the SK2 behavior would differ from SK1. From the `Transaction.all` docs: > This sequence returns the user’s transaction history current to the moment you access the sequence. The sequence emits a finite number of transactions. If the App Store processes new transactions for the user while you’re accessing this sequence, the new transactions appear in the transaction listener, updates. These new tests verify the behavior of the SDK when encountering transactions created prior to initializing the SDK, and some made after initialization. Integration tests now are as follows: - `BaseStoreKitIntegrationTests` - `StoreKit1IntegrationTests` - `StoreKit2IntegrationTests` - `BaseStoreKitObserverModeIntegrationTests`: - `StoreKit1ObserverModeIntegrationTests` - `StoreKit2ObserverModeIntegrationTests` - `StoreKit1ObserverModeWithExistingPurchasesTests` - `StoreKit2ObserverModeWithExistingPurchasesTests` Depends on #2064, #2066, and #2134. [TRIAGE-179]: https://revenuecats.atlassian.net/browse/TRIAGE-179?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While it's not documented,
Transaction.updateswill only send updates for purchases being made on other devices or renewed. Purchases made on the same device will not receive an update through.updates. Instead, those get them through.all.This draft PR updates the logic so that in observer mode we don't miss transactions made on the same device.