-
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
AppleReceipt
: refactored declarations into nested types
#1933
Merged
Conversation
This file contains 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
Before this change we had a lot of global types. Now they're all nested inside of `AppleReceipt`, `InAppPurchase`, and `InAppPurchaseBuilder`.
tonidero
approved these changes
Sep 23, 2022
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.
Nice cleanup!
NachoSoto
added a commit
that referenced
this pull request
Sep 27, 2022
**This is an automatic release.** ### New Features * 🚨 `StoreKit 2` is now enabled by default 🚨 (#1922) via NachoSoto (@NachoSoto) * Extracted `PurchasesType` and `PurchasesSwiftType` (#1912) via NachoSoto (@NachoSoto) ### Bugfixes * `StoreKit 1`: changed result of cancelled purchases to be consistent with `StoreKit 2` (#1910) via NachoSoto (@NachoSoto) * `PaymentQueueWrapper`: handle promotional purchase requests from App Store when SK1 is disabled (#1901) via NachoSoto (@NachoSoto) ### Other Changes * Fixed iOS 12 tests (#1936) via NachoSoto (@NachoSoto) * `CacheableNetworkOperation`: fixed race condition in new test (#1932) via NachoSoto (@NachoSoto) * `BasePurchasesTests`: changed default back to SK1 (#1935) via NachoSoto (@NachoSoto) * `Logger`: refactored default `LogLevel` definition (#1934) via NachoSoto (@NachoSoto) * `AppleReceipt`: refactored declarations into nested types (#1933) via NachoSoto (@NachoSoto) * `Integration Tests`: relaunch tests when retrying failures (#1925) via NachoSoto (@NachoSoto) * `CircleCI`: downgraded release jobs to Xcode 13.x (#1927) via NachoSoto (@NachoSoto) * `ErrorUtils`: added test to verify that `PublicError`s can be `catch`'d as `ErrorCode` (#1924) via NachoSoto (@NachoSoto) * `StoreKitIntegrationTests`: print `AppleReceipt` data whenever `verifyEntitlementWentThrough` fails (#1929) via NachoSoto (@NachoSoto) * `OperationQueue`: log debug message when requests are found in cache and skipped (#1926) via NachoSoto (@NachoSoto) * `GetCustomerInfoAPI`: avoid making a request if there's any `PostReceiptDataOperation` in progress (#1911) via NachoSoto (@NachoSoto) * `PurchaseTester`: allow HTTP requests and enable setting `ProxyURL` (#1917) via NachoSoto (@NachoSoto)
NachoSoto
added a commit
that referenced
this pull request
Sep 27, 2022
The name `InAppPurchase` is too general. This type in particular is specific to the content of `AppleReceipt`, so nesting it makes that clear. Follow up to #1933.
NachoSoto
added a commit
that referenced
this pull request
Sep 28, 2022
commit 2221edaeb8ee259748f231beb024565196c8b173 Author: NachoSoto <ignaciosoto90@gmail.com> Date: Tue Sep 27 18:14:31 2022 -0700 Printing invalid receipt commit 0781bf43a8354c73e6815285c19ecdf25509bfe7 Author: NachoSoto <ignaciosoto90@gmail.com> Date: Tue Sep 27 18:09:16 2022 -0700 Don't return invalid receipts commit ba64e8483934590378b17d1492493d3f99b8525b Author: NachoSoto <ignaciosoto90@gmail.com> Date: Tue Sep 27 17:48:13 2022 -0700 Using `.retryUntilProductIsFound` commit a38126aae6b7621d775de2bdc71ede06fde3d5d1 Author: NachoSoto <ignaciosoto90@gmail.com> Date: Tue Sep 27 17:47:56 2022 -0700 Added `ReceiptRefreshPolicy.retryUntilProductIsFound` commit abcc2f31e8a8de57895481e1de5f94e8c948eba1 Author: NachoSoto <ignaciosoto90@gmail.com> Date: Tue Sep 27 13:47:03 2022 -0700 [move] Abstracted conversion from `async` to completion-block APIs Created `Async` with some shared methods that make this conversion simpler in a type-safe way. commit 22200e53f1753098d8c7e896ac407c4c404d4fc2 Author: NachoSoto <ignaciosoto90@gmail.com> Date: Tue Sep 27 12:53:38 2022 -0700 Moved `InAppPurchase` into `AppleReceipt` The name `InAppPurchase` is too general. This type in particular is specific to the content of `AppleReceipt`, so nesting it makes that clear. Follow up to #1933. commit 84519ac5214668998293019ba437d51b49a1733c Author: NachoSoto <ignaciosoto90@gmail.com> Date: Tue Sep 27 12:40:54 2022 -0700 [move] Refactored `ReceiptFetcher.receiptData` I'm considering adding a 4th `ReceiptRefreshPolicy` that re-fetches the receipt N-times until it finds a transaction for a recently purchased product ([CSDK-478]). This will make it easier to implement.
NachoSoto
added a commit
that referenced
this pull request
Sep 28, 2022
The name `InAppPurchase` is too general. This type in particular is specific to the content of `AppleReceipt`, so nesting it makes that clear. Follow up to #1933.
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.
Before this change we had a lot of global types. Now they're all nested inside of
AppleReceipt
,InAppPurchase
, andInAppPurchaseBuilder
.