issues
search
superwall
/
Superwall-iOS
Remotely configure every aspect of your paywall and double your revenue.
https://superwall.com
MIT License
82
stars
22
forks
source link
Internal purchase controller refactor
#186
Open
super-bryan
opened
8 months ago
super-bryan
commented
8 months ago
Changes in this pull request
Allows an internal purchase controller (termed "automatic purchase controller") to be used identically to an external purchase controller
Order of initialization in the DependencyContainer no longer matters
Fixes issue with tests that could cause some dependencies to not use the mocked dependencies (can explain more if you want after seeing the PR)
Removes redundancy of providing dependencies with a set of parameters and a factory that provides those same parameters
Uncouples ReceiptManager logic from the original purchase controller
Moves receipt logic from the StoreKitManager into the ReceiptManager
Removes the need for if/else logic when it comes to purchase controller logic
Removes all use of unowned variables
Removes force unwrapping in the dependency container
Uses the adapter pattern only when necessary (i.e. only for objc types)
Makes classes more protocol-oriented to avoid tightly coupled classes
Checklist
[ ] All unit tests pass.
[ ] All UI tests pass.
[ ] Demo project builds and runs.
[ ] I added/updated tests 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
Changes in this pull request
Checklist
CHANGELOG.md
for any breaking changes, enhancements, or bug fixes.swiftlint
in the main directory and fixed any issues.