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

Feature/add internal purchase controller #166

Merged
merged 8 commits into from
Aug 31, 2023

Conversation

yusuftor
Copy link
Collaborator

@yusuftor yusuftor commented Aug 30, 2023

Changes in this pull request

  • Refactors the purchasing to use an InternalPurchaseController. This is responsible for figuring out whether to use a developer-provided purchase controller, or using its own productPurchaser when purchasing/restoring. Minimised the use of hasPurchaseController throughout the SDK by calling things directly in the purchase controller. Setting of the subscription status also happens inside the purchase controller.
  • Fixes issue where verification of transactions was happening after the finishing of transactions when not using a PurchaseController.
  • Stops exposing ASN1Decoder publicly.

Checklist

  • All unit and UI tests pass. Demo project builds and runs.
  • I added tests, an experiment, or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run swiftlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

- Created an InternalPurchaseController. This coordinates the purchasing between provided purchase controllers and the internal purchasing mechanism.
- Removed StoreKitCoordinator and removed redundant files like PurchaseManager.
- Verification now happens before finishing a product.
- No longer checks for restored product after purchase. This means if someone repurchases a product they already have, it'll count as a transaction_complete. This shouldn't be happening anyway, but something to consider.
- Stops ASN1 files from being public/open.
- Fixes tests
@yusuftor yusuftor merged commit 8119196 into develop Aug 31, 2023
2 checks passed
@yusuftor yusuftor deleted the feature/add-internal-purchase-controller branch August 31, 2023 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant