feat(InAppPurchaseView): allow inserting custom view content#1
feat(InAppPurchaseView): allow inserting custom view content#1porcupine072 wants to merge 3 commits intoadamfootdev:mainfrom
Conversation
|
Hi, Thanks for the feedback and I can see a feature like this being useful! To improve it, I think CustomContentInsertionPoint should be removed and instead replaced by an enum that enables the developer to fully control the order of content. For example, the could put features above/below the tiers. The enum would then have a case where the developer could pass in a custom view. A default order of how it is at the moment would be set in the initialiser. Thanks |
|
Agreed, that would be a cleaner approach. I’ll look into it. |
…ontent via contentOrder composition and custom view rendering
|
Hey Adam, I've made the changes you suggested. This approach does feel much cleaner now. The enum InAppPurchaseViewContent has the static var defaultOrder. Ordering can be customized, for example: |
Good day,
First, I would like to express my gratitude for this package. It has definitely saved me countless weeks of work.
I was able to add a one-off lifetime purchase tier with your package with ease. It is in production in my Mac app :)
This PR is a simple one. My motivation is I want to run a promotion using App Store Offer Codes. Displaying wording about the promotion in InAppPurchaseKit is important because it is the source of truth when a user is deciding to make a purchase.
If I have a View stating the promotion event in the app elsewhere, I run the risk of the user not seeing that View.
This PR adds the ability to simply inject a View at a given point in the hierarchy of InAppPurchaseView.
Such a PR would allow me to achieve my goal without getting messy in forking and maintaining a separate repository for this package.
It may be useful for others as well. Who knows.
Thanks again for your work here, I'm sure you have saved many a lot of time.