Skip to content

Marketing power#2

Merged
hanrw merged 7 commits intomainfrom
MarketingPower
Sep 21, 2025
Merged

Marketing power#2
hanrw merged 7 commits intomainfrom
MarketingPower

Conversation

@hanrw
Copy link
Copy Markdown
Member

@hanrw hanrw commented Sep 21, 2025

This pull request introduces marketing enhancements to the product configuration and purchase UI in the InAppKit library. The changes add support for promotional badges, marketing features, and savings information for products, and make these available throughout the configuration, context, and UI layers. The codebase now allows for richer product presentation and easier access to marketing data.

Product Configuration and API Extensions

  • Added new properties (badge, marketingFeatures, savings) to ProductConfig and InternalProductConfig, updated initializers, and provided a new overload of the Product function to support marketing information. Also added fluent API extensions (withBadge, withMarketingFeatures, withSavings) for easy configuration. [1] [2] [3]

StoreKit Configuration Integration

  • Updated StoreKitConfiguration to propagate marketing information from ProductConfig to InternalProductConfig, and refactored the setup logic to use a new initialization method that handles both features and marketing info. [1] [2]

Paywall Context Marketing Accessors

  • Added helper methods and computed property in PaywallContext to retrieve badge, marketing features, savings, and combined marketing info for StoreKit products, enabling convenient access to marketing data in paywall flows.

InAppKit Core Marketing Storage and Retrieval

  • Introduced a new productMarketingInfo dictionary in InAppKit to store marketing data, updated initialization to populate it, and added public accessor methods for badge, marketing features, and savings information. [1] [2] [3]

Purchase Option Card UI Enhancements

  • Refactored PurchaseOptionCard to accept and display marketing information (badge, features, savings), added styling constants, improved description logic, and split the UI into a shared view component for better maintainability and extensibility. [1] [2] [3] [4] [5]

Add optional badge, features, and savings display to PurchaseOptionCard.
Extend ProductConfig to include marketing metadata and propagate these
through configuration, core, and PaywallView for enhanced paywall UI.
Update README with marketing-enhanced usage examples.
Document new badge, marketing features, and savings displays with usage examples and API methods to enhance product presentation.
Use user-defined product descriptions when available and update preview demo to mirror the real component structure with clearer labels and selection logging.
Introduce shared PurchaseOptionCardView for cleaner separation and styling.
Consolidate period text formatting with style variants and apply consistent design constants.
Simplify preview by using the new shared component and remove duplicate demo code.
…nitialize

Replace manual feature registration and product loading with a single call to InAppKit.initialize to streamline setup.
Add detailed documentation with examples for type-safe and flexible feature definitions, product marketing enhancements, feature gating in UI, custom paywall implementation, and subscription status display.
Enhance PaywallContext with badge, features, and savings accessors to support marketing data.
Update README with usage examples showing how to build custom paywalls using these marketing helpers.
Add tests verifying PaywallContext marketing helpers and productsWithMarketing property.
@hanrw hanrw merged commit caa6a3a into main Sep 21, 2025
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.

1 participant