* Version bump for 5.19.0
* To revert: Deploy UI SDK on commit to continue release process
* Revert "To revert: Deploy UI SDK on commit to continue release process"
This reverts commit 3dca36e0ae.
---------
Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
* feat: disable postAttributionData requests when in UI preview mode
* tests: add unit test to check `AttributionPoster`'s new `clearPostponedAttributionData` method
* tests: add unit tests to check that `AttributionData` is never posted in UI preview mode
* refactor: simplify implementation of avoiding `AttributionPoster` requests in UI preview mode
* feat: add `hasPaywall` getter to `Offering`
Returns `true` if the offering has either a v1 or a v2 paywall
* docs: update some methods references changing `PaywallData` with "paywall", as `PaywallData` only refers to v1 paywalls
* docs: improve reference of `Offering`'s `paywall` and `paywallComponents` to mention the new `hasPaywall` property
* lint
* tests: add unit tests that check the `hasPaywall` property of `Offering`
* api tests: add `paywallComponents` and `hasPaywall` to SwiftAPITester
* feat: add missing properties to `apple_purchase_attempt` diagnostics event
* tests: add + edit unit tests for new diagnostics parameters for SK1 purchase attempt
* fix implementation of sk2 product purchase to catch promotional offer signature error again
* tests: edit unit tests for new diagnostics parameters for SK2 purchase attempt
* fix failing test
* refactor: separate error handling in purchase SK2 product method into its own method
* address PR #4835 comments
* lint
* tests: remove `Equatable` conformance of `DiagnosticsEvent` and `AnyEncodable` from RevenueCat and added to test targets (where it's needed)
* Use Arrays instead of Sets in Diagnostics events to have predictable order in sent events
* tests: compare Sets vs Arrays in unit test
The conversion from Array --> Set --> Array may change the order of the elements
* remove `DiagnosticsEvent+Equatable` from some targets
* PR #4839 fixes
* remove `AnyEncodable+Equatable.swift` from some targets
* Prevent calling the GET request to the intro eligibility endpoint when in UI Preview mode
* fix lint warning
* tests: add unit tests for `TrialOrIntroPriceEligibilityChecker` in UI preview mode
* fake `unknown` intro eligibility status for products in UI preview mode
* tests: remove empty check on intro eligibility result dictionary when in UI preview mode
* add comment to early return for check eligibility in UI preview mode
* do not update cache when in UI preview mode
* tests: add unit tests to check that first initialization never calls get offerings when in UI preview mode
* tests: add unit test to cover call to `updateAllCachesIfNeeded(isAppBackgrounded: Bool)` in UI preview mode
* Prevent calling the GET request to the intro eligibility endpoint when in UI Preview mode
* fix lint warning
* tests: add unit tests for `TrialOrIntroPriceEligibilityChecker` in UI preview mode
* fake `unknown` intro eligibility status for products in UI preview mode
* tests: remove empty check on intro eligibility result dictionary when in UI preview mode
* add comment to early return for check eligibility in UI preview mode
* Version bump for 5.17.0
* Update RevenueCat-Swift.h for version 5.17.0
* fix FeedbackSurveyViewModelTests
* Group SwiftUI previews
---------
Co-authored-by: Cesar de la Vega <cesarvegaro@gmail.com>
Co-authored-by: Mark Villacampa <m@markvillacampa.com>
* This mostly works
* Some cleanup and todos
* Fixed
* BROKEN but need to rebase
* The rework happened
* This is feeling pretty good
* This works
* Fix lint
* Oops
* Or this
* Removed size and implemented top and bottom pager
* Added a todo and compile error
* Made page control optional and added optional size that defaults to fit fit
* Fixes from PR review
* Fix podlint
* feat: mock `CustomerInfo` when in UI Preview mode and avoid caching it
* feat: return mock `CustomerInfo` when in UI Preview mode when requesting the cached `CustomerInfo`
* tests: add unit test for `CustomerInfo` mock in UI Preview mode
* fix linter complaints
* Visible property
* Added visible property to components
* Removed the EmptyView() from visibles which was necessary
* New VisisbleIfNeeded view
* Removed new VisibleIfNeeded view and made the thing apply functions a ViewBuilder
* Removed extra lint rule
* feat: add support for presenting draft paywalls under `@_spi(Internal)` attribute
* fix: initialize `useDraftPaywall` property of `PaywallView`
* feat: have `PaywallView` actually show draft paywall when `useDraftPaywall` is `true`
* remove lint warning
* silence linter warning
* tests: add unit tests for `paywallComponents` and `draftPaywallComponents` in `OfferingsResponse`
* tests: move test offerings with v2 paywalls into a new file not to affect existing decode + encode test
* remove unnecessary property wrapper
* silence lint warning
* feat: force fetch Offerings from network when in UI Preview mode
* test: add unit test for force fetching Offerings from network when in UI Preview mode
* feat: mock fetched `StoreProducts` when in UI Preview mode
* feat: improve mocking of products in UI Preview mode to have consistent paywall previews
* fix: mock of products where packages are not unique
* test: add unit tests for OfferingsManager in UI preview mode
* address PR #4735 comments
* feat: use fix, hardcoded `appUserID` for UI preview mode
* test: add unit tests for user ID in UI preview mode
* fix linter's Trailing Whitespace Violations
* PR #4725 comments
* Change default appUserID for UI Preview mode.
* Add debug log regarding the use of UI Preview mode user ID.
* We can't just remove PAYWALL_COMPONENT because we don't support macos and tv and things were failing
* Move PartialComponent outside of PaywallComponent extension
* Fix some lint errors
* Wrong thing
* Undid things i shouldn't have done
* Removed more
* Added comment
* Removed/fix some places for the check thingies
* RevenueCat module compiles on all the things
* RevenueCatUI compiles in all the platforms now
* Make all the things compile again
* Make work for visionOS
* Fix some platform and xcode version issues
* Fix failing spm ios 15 test
* Undo circleci changes
* Replace smooth with easeInOut
* Only run the thing i want
* Attempt to remove circular
* Explicit returns
* Does this pass
* This is it
* Swift 5.9 for this
* All tests again
* Undid public testing processor stuff
* Undo this too
* Swift compiler check out pill style circular
* Fixes from PR review
* Fix compile for mac
* add new opt-in public API `uiPreviewMode` to `DangerousSettings`
* fix: add missing `convenience` to `uiPreviewInitializer` of `DangerousSettings`
* docs: change documentation of `DangerousSettings` init
* test: add API test for new `DangerousSettings` init
* A few badge-related changes:
- Position the Overlaid badge in the middle if the border instead of its outer edge.
- Position Nested badges inside the border of the stack by default.
- Clip trailing/leading edge-to-edge badges, as well as nested badges, to prevent them form rendering outside the bounds of the stack.
- This requited us to extract the Shadow from the Shape modifier so they can be applied separatedly. This allows us to apply the badge modifier in the middle, and let it clip the stack before applying the Shadow.
* move shape helpers back to Shape.swift
* Fix support for badge padding
* add back shadow to shape previews
* Fix edge-to-edge top/bottom badges
* fix shadow
* add previews for different stack shapes
properly support top/bottom edge-to-edge badges by extending them behind the stack
* no longer needed to make badge full width
* use rectangle as default shadow shape
* Ensure the border appears over the nested badge in case it needs to clip
* lint