* Version bump for 5.68.0
* Revert PaywallsV2 header component addition
Revert addition of PaywallsV2 header component and update related entries.
* Update CHANGELOG.md
---------
Co-authored-by: Cesar de la Vega <664544+vegaro@users.noreply.github.com>
* Version bump for 5.61.0
* Update RevenueCat-Swift.h for version 5.61.0
* Fix exit offer crash in MY_APP mode
* Fix exit offer crash in MY_APP mode
* fix deploy to spm
---------
Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
Co-authored-by: Cesar de la Vega <664544+vegaro@users.noreply.github.com>
* Add color computation helpers for WCAG-compliant contrast calculations
Adds ColorComputationHelpers.swift with pure utility functions for:
- WCAG 2.1 relative luminance and contrast ratio calculations
- sRGB linearization (gamma correction removal)
- Platform-agnostic RGB component extraction
- Best-contrast color selection from a candidate set
These will be used by the upcoming fallback paywall to adaptively
choose text colors with sufficient contrast against backgrounds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add app style extractor for icon color extraction
Adds AppStyleExtractor which extracts the app icon, display name,
and prominent colors from the host app bundle. Uses pixel sampling
with color quantization to identify 1-2 dominant colors from the
app icon, filtering transparent/extreme brightness pixels.
Also adds:
- DualColorImageGenerator (DEBUG only) for creating deterministic
test images with known color splits
- AppStyleExtractorTests covering accuracy for multiple color
combinations and edge cases (nil, transparent, dark/bright)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* PR Feedback
* Create AppIconDetailProvider.swift
* Update project.pbxproj
* Remove duplicate instance methods and qualify test calls
Remove unreachable non-static instance methods from
ColorComputationHelpers enum (dead code left over from
global-to-enum conversion). Update tests to use qualified
ColorComputationHelpers.method() calls.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Add @MainActor, fix watchOS icon guards, fix typo
- Add @MainActor to AppIconDetailProvider since it is an
ObservableObject with @Published properties
- Add #if !os(watchOS) guards in AppStyleExtractor for icon
loading — watchOS app icons are system-managed with no
runtime API to load them
- Fix toAppIconDetailprovider -> toAppIconDetailProvider typo
Co-authored-by: Cursor <cursoragent@cursor.com>
* correct use of main actor
* address cursor comment about brightness filter
* import Combine needed for watchos to compile and build -> @Published
* Add PaywallWarning model and validation documentation
Adds PaywallWarning enum that maps PaywallValidationError cases to
user-facing titles, body text, and help URLs linking to the
RevenueCat dashboard or docs. This model will power the debug
warning banner in the upcoming fallback paywall.
Also adds comprehensive documentation to PaywallData+Validation.swift
explaining each validation error case, when it occurs, and how to
resolve it.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix typo and add missing helpURL for missingLocalization
Fix "Unkown" -> "Unknown" in invalidTemplate title.
Add .missingLocalization to the helpURL case group so it
returns the paywalls docs URL instead of nil.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Add default/fallback paywall UI components and assets
Adds the complete UI layer for the fallback paywall:
- DefaultPaywallView: Main view with app icon, color-adaptive
background gradient, package list, and purchase/restore buttons.
Adapts text colors using WCAG contrast calculations against the
extracted app icon colors.
- DefaultPaywallWarning: DEBUG-only error banner showing validation
error details with links to the RevenueCat dashboard.
- DefaultProductCell: Radio-button-style package selection row
showing product title and localized price.
- AppIconDetailProvider: ObservableObject managing async color
extraction from the app icon.
- DefaultPaywallPreviews: DEBUG-only preview provider with 6+
color variants and 4+ warning state previews.
- Media.xcassets: Warning illustration assets for the debug banner.
The view is self-contained and not yet wired into PaywallView.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix StateObject, error handling, and qualified calls
- Change @ObservedObject to @StateObject for appIconDetailProvider
to prevent re-creation on parent re-renders
- Add do-catch to purchase/restore Task blocks so errors are not
silently swallowed
- Qualify selectColorWithBestContrast calls with ColorComputationHelpers
Co-authored-by: Cursor <cursoragent@cursor.com>
* Fix typo call sites and add @MainActor to DefaultPaywallView
- Fix toAppIconDetailprovider -> toAppIconDetailProvider in
all 10 preview call sites
- Add @MainActor to DefaultPaywallView to match MainActor-
isolated AppIconDetailProvider
- Change iconDetailProvider param to optional with nil default
so AppIconDetailProvider() is created inside the MainActor
init body rather than as a default parameter expression
Co-authored-by: Cursor <cursoragent@cursor.com>
* Apply suggestion from @JZDesign
* simplify initializer
* trigger checks:
request-checks: true
* revert whatever the AI did…
* fix media inclusion
* attempt to appease iOS 15 compilers
* Add swiftlint rules to prevent the issue of state vars being set without wrapping it in a state object first
* Update RevenueCatUI.podspec
* Update DefaultPaywallView.swift
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>