Commit Graph
3794 Commits
Author SHA1 Message Date
RevenueCat Git BotandToni Rico 3f5e28bfb0 [AUTOMATIC] Release/5.19.0 (#4854)
* 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>
2025-03-06 15:04:17 +01:00
Antonio Pallares fb6a4cb12b Have snapshot tests use same encoding as SDK (#4856)
* tests: have `JSONEncoder` of snapshot tests be a copy of the encoder user in the SDK

* tests: update the dates in the `CustomerInfo` snapshots for decoding tests to have ISO 8601 format

* update variable comment

* fix lint
2025-03-06 14:36:47 +01:00
Antonio Pallares 05fc0a90f3 feat: disable postAttributionData requests when in UI preview mode (#4824)
* 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
2025-03-05 18:04:59 +01:00
Facundo Menzella 0858bea976 chore: Disable EventsManagerIntegrationTests till fixed (#4852)
* chore: Disable EventsManagerIntegrationTests till fixed

* disable in all testplans
2025-03-05 14:27:11 +01:00
Facundo Menzella 8cb6322184 feat: Add onClose handler support for CustomerCenter (#4850) 2025-03-04 21:34:53 +01:00
Cesar de la Vega 580ab21798 run all tests on main (#4849) 2025-03-04 17:00:07 +01:00
Josh Holtz 28aa6765ac Add activity indicator to restore purchases button behavior (#4848)
* Add activity indicator to restore purchases

* Start of smarter indicatoring

* Fixed

* Don't add progress indicators to all the things

* Fix pod lint
2025-03-04 09:40:31 -06:00
Antonio Pallares 81aaf6a051 Offering hasPaywall getter (#4847)
* 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
2025-03-04 12:09:53 +01:00
Antonio Pallares 0ec39f66ae Fix potential wrong count on diagnosis sync (#4846)
* fix: potential count desync in `DiagnosticsSynchronizer`

* tests: add unit tests for invalid entry lines in local diagnostics file
2025-03-04 08:55:05 +01:00
Mark Villacampa 6322c486de Always use normal stack if the relevant axis size is fit (#4842) 2025-03-03 20:11:41 +01:00
Pol Piella Abadia 3bf9fa9576 Uses the remote version of purchases-ios for the SwiftUI sample app (#4841)
* Uses the remote version of `purchases-ios` for the sample app

* Removes framework reference to fix build failure

* Removes workspace

* Resets `Package.resolved` to fix compiler errors

* Re-adds missing dependency

* Updates `README.md`
2025-03-03 16:28:49 +00:00
Antonio Pallares f7fa5d2e81 [Diagnostics] Add extra parameters to applePurchaseAttempt (#4835)
* 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
2025-03-03 14:38:00 +01:00
Antonio Pallares de879a0889 Use array instead of sets in diagnostics events (#4839)
* 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
2025-03-02 12:50:03 +01:00
Andy Boedo 18b758ca1e fixed an ambiguous reference in xcode beta (#4840) 2025-02-28 16:45:17 -03:00
Facundo Menzella fde4e13cd4 chore: Add integration test for analytics events (#4830) 2025-02-28 14:55:32 +01:00
Mark Villacampa 0fdcc668e7 Update changelog with 4.43.3 and 4.43.4 (#4834) 2025-02-28 13:14:12 +01:00
0dc4f55593 Add default refundWindowDuration to HelpPath.init (#4826)
* add default refundWindowDuration to HelpPath.init

* nil by default

* tweaked refund backend decoder

* tweak initialiser

---------

Co-authored-by: Facundo Menzella <facumenzella@gmail.com>
Co-authored-by: Facundo Menzella <facumenzella@users.noreply.github.com>
2025-02-28 09:57:55 +01:00
Toni Rico 8f5a9488e0 [Diagnostics] Add requestedProductIds and notFoundProductIds to appleProductsRequest (#4828) 2025-02-28 09:43:19 +01:00
Will Taylor 8401da1fe0 add RCStoreMessageTypeWinBackOffer to Obj-C API tester 2025-02-27 10:40:39 -06:00
Facundo Menzella 6b5c430082 chore: Enable force_unwrapping for SwiftLint (#4820)
* enable force_unwrapping

* avoid force unwrap

* fixed all errors

* remove extra disable
2025-02-26 12:40:49 +01:00
Facundo Menzella d2271db8c5 chore: Delete .orig file and ignore in git ignore (#4821)
* chore: Remove .orig file

* ignore orig files
2025-02-26 12:21:35 +01:00
Facundo Menzella 8c4bb07e08 feat: Hide refund for purchases in trial period (#4823) 2025-02-26 12:04:21 +01:00
Toni Rico b5e1fcb77f Post error test results to Slack (#4404)
* Post error test results to Slack

* To revert: Add linter error

* Test different context

* Revert "To revert: Add linter error"

This reverts commit 2177c48f0dd5d346b9e536d10f58fb82e05665ba.

* Post only on main

* Remove notify from danger job

* To revert: testing branch specific notifications

* Revert "To revert: testing branch specific notifications"

This reverts commit 560285798faf8c9dcf7d99ec5d7ac9faf31d9bf7.

* Only run slack-notify command on jobs running in main

* Change to have a separate job for failures instead of running as a step on each job

* Reapply "To revert: Add linter error"

This reverts commit 2a4004798be2a1d1371224a43cdfe373477f0fc7.

* Revert "Reapply "To revert: Add linter error""

This reverts commit 5c3eef438c.

* Revert "Change to have a separate job for failures instead of running as a step on each job"

This reverts commit 0fe54a42f3.

* Rename to slack-notify-on-fail
2025-02-26 09:06:09 +01:00
Antonio Pallares 69fa618a9f fix: correctly set PaywallsTester app API key by the CI (#4822) 2025-02-26 08:36:17 +01:00
Facundo Menzella c1e96e00d6 feat: Don't show refund if free subscription (#4805)
* Added refund_window

* missing tests

* feat: Support refund_window to hide refund path

* removed docs

* removed docs

* fixed previews

* fixed RC tests

* Update Tests/TestingApps/PaywallsTester/PaywallsTester/Config/ConfigItem.swift

* nits

* Use customercenter reuqested date

* feat: Don't show refund if free

* add comments

* requestDate from customerInfo
2025-02-25 13:31:58 +01:00
Facundo Menzella 75471965de feat: Introduce refund window to control if a refund is offered for a purchase (#4784) 2025-02-25 13:13:49 +01:00
JayShortway f9708b61fc Adds a note on publishing to the missing paywall error. (#4817) 2025-02-25 12:38:57 +01:00
JayShortway e8f148dfda Adds buildServer.json to .gitignore (#4819) 2025-02-25 12:24:48 +01:00
Antonio Pallares 1af9f8f6f4 fix: consider empty strings in proxyURL parameters in Local.xcconfig (#4818) 2025-02-25 11:03:25 +01:00
Mark Villacampa 8d0475842a Use CSS linear-gradient spec to compute gradient start/end points (#4789) 2025-02-24 16:27:32 +01:00
Mark Villacampa aa746eeae5 [Paywalls] Add support for shadows in image components (#4797)
* Add support for shadows in image components

* add border support to image component

* fix
2025-02-24 15:02:26 +01:00
Mark Villacampa a57a32abd6 [Paywalls] Fix badge background not using the new background field instead of ba… (#4811)
* Fix badge background not using the new background field instead of backgroundColor

* switch order of background properties: background is preferred over backgroundColor
2025-02-24 12:39:27 +01:00
RevenueCat Git BotandToni Rico da921f03d9 Preparing for next version (#4816)
Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
2025-02-24 11:55:48 +01:00
Antonio Pallares f208ea1c30 fix: workaround to allow using proxyURL in Local.xcconfig (#4810) 2025-02-24 10:43:57 +01:00
RevenueCat Git Bot ce8ad14741 [AUTOMATIC] Release/5.18.0 (#4815)
* Version bump for 5.18.0

* Update RevenueCat-Swift.h for version 5.18.0
2025-02-22 09:41:07 -06:00
Will Taylor 33e0a78973 fix SDK compilation on Xcode 16.3 beta/iOS 18.4 beta 1 2025-02-22 06:38:31 -06:00
Antonio Pallares b19f66bf28 UI preview mode: disable cache updates (#4809)
* 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
2025-02-21 16:32:20 +01:00
Facundo Menzella ed20901ae1 fix: [AppUpdateWarningView] Tweak buttons bottom alignment and padding (#4807) 2025-02-21 13:53:12 +01:00
Antonio Pallares e3538def56 UI Preview mode: avoid intro eligibility request (#4800)
* 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
2025-02-21 13:02:23 +01:00
Toni Rico b6c78c60c1 [Diagnostics] Fix store kit error description tracking (#4799) 2025-02-21 12:01:41 +01:00
Antonio Pallares 70ea44f533 Add no quotes hints to build settings in Local.xcconfig.SAMPLE (#4808) 2025-02-20 22:23:28 +01:00
Mark Villacampa 55d21a9042 fix onRestoreComplete callback not being called (#4803) 2025-02-20 21:48:48 +01:00
Antonio Pallares 6c07039715 UI preview mode: disable log in and log out (#4804)
* fail when making log in or log out calls in UI preview mode

* Add unit tests for log in and log out in UI preview mode
2025-02-20 18:27:16 +01:00
JayShortway 636ba9e414 Fixes parsing generic fonts. (#4801) 2025-02-20 11:11:27 +01:00
Antonio Pallares b077e9e0b9 Config item rename (#4798)
* add deeper explanation to `refreshableDisabled()` modifier introduce in #4793

* refactor: rename `ConfigItem` to `Constants` in PaywallsTester app

* fix lint warnings
2025-02-19 12:41:15 +01:00
Antonio Pallares 7785df9afb Fix paywall refreshable bug (#4793)
* add refreshable action to paywalls list in PaywallsTester app

* fix: disable refreshable action in PaywallView

* chore: add comment explaining why `refreshable` action was added to `APIKeyDashboardList`
2025-02-19 10:08:19 +01:00
Antonio Pallares af30b55cae Use RC API key for local development from local.xcconfig (#4795)
* feat: have testing apps take RevenueCat API key and Proxy URL from local.xcconfig file

* fix wording mistakes in `Local.xcconfig.SAMPLE`

* chore: include `ConfigItem.swift` file in `verify_no_included_apikeys` check

* fix more mistakes in comments
2025-02-19 09:48:25 +01:00
Greenie 880c441798 Add prepaid as a period type (#4782) 2025-02-18 21:16:52 +00:00
Facundo Menzella 2dfc56dd10 fix: Remove force unwrapping from PurchaseHistoryView (#4794)
* fix: Remove force unwrapping from PurchaseHistoryView

* Update .swiftlint.yml
2025-02-18 15:42:36 +01:00
Facundo Menzella 1de4d9e676 fix: Remove NavigationView/NavigationStack from AppWarningView (#4792) 2025-02-18 15:00:21 +01:00