Commit Graph
31 Commits
Author SHA1 Message Date
fba61f409c Support different modes for depending on RevenueCat when using Tuist (#5888)
* WIP

* Merge branch 'main' into default-tuist-to-local-swift-package

* Cleanup

* Merge branch 'main' into default-tuist-to-local-swift-package

* Fix error with RevenueCatUI

* Removes project v3LoadShedderIntegration from tuist integration

* Add both CI.xcconfig and Local.xcconfig if they are both available

* Remove unnecessary package

* Remove purchases-ios as s tuist dependency

It's already resolved in Tuist/ProjectDescriptionHelpers/ProjectDescriptionPackages.swift

* New tuist project "RevenueCatTests" containing all test targets

* Merge branch 'main' into default-tuist-to-local-swift-package

* Fix Tuist dependency mode issues and clean up project structure

- Use exhaustive switch in ProjectDescriptionPackages instead of if/else if
- Extract shared allDestinations/allDeploymentTargets into ProjectDescriptionHelpers (DRY)
- Fix duplicate ReceiptParser scheme across RevenueCat and RevenueCatTests projects
- Remove stale cross-project test target references from schemes
- Fix bundleId typo in BackendCustomEntitlementsIntegrationTests
- Restore purchases-ios in Tuist/Package.swift for remoteXcodeProject mode
- Make RevenueCat/RevenueCatUI workspace inclusion conditional on dependency mode
- Fix BinarySizeTest to use shared dependency helpers instead of removed APIs
- Fix misleading doc comments on internal dependency helpers

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove and gitignore file

* Fix Bundle.module ambiguity in RevenueCatUITests and add explicit scheme

Use Bundle.revenueCatUI instead of Bundle.module to resolve ambiguity
when both RevenueCat and RevenueCatUI are imported via @testable in SPM
modes (each module synthesises its own internal Bundle.module).

Add explicit RevenueCatUITests scheme to RevenueCatTests project for
proper scheme generation during full tuist generate.

Made-with: Cursor

* Fix BinarySizeTest localSource deps and remove dead code

Revert BinarySizeTest localSource to explicit .project(target:)
references — it manages its own integration modes independently of
DependencyMode, and the switch to .revenueCat/.revenueCatUI broke it
in the default localSwiftPackage mode (no SPM package declared).

Remove unused allDeploymentTargets constant from RevenueCatUI project.

Made-with: Cursor

* Add priority flush with rate limiting and queuing for feature events

Priority events (paywall impressions, custom paywall events) now trigger
an immediate flush to the backend. A rate limiter (5 calls/60s) prevents
excessive network requests from rapid tracking calls. When a priority
event arrives during an in-progress flush, it is queued and drained
after the current flush completes.

* Extract EventsManagerStrings to separate file to fix file length lint

* Fix integration tests: use non-priority events for flush tests

The `.impression` event now triggers a priority flush, which can
consume the event before the test's explicit `flushPaywallEvents`
call. Replace with `.cancel` (non-priority) since these tests
verify flush mechanics, not event-type behavior.

* Fix duplicate RevenueCat targets in localSwiftPackage mode

Exclude RevenueCat/RevenueCatUI Tuist projects from the workspace when
using localSwiftPackage dependency mode, since the local SPM package
already provides these targets. Including both caused "Multiple commands
produce" build errors (e.g. in the BinarySizeTest CI job).

Also update BinarySizeTest's localSource integration to use SPM package
dependencies instead of Tuist project target references, consistent with
the workspace no longer including those projects in SPM mode.

Made-with: Cursor

* Move rate limiter check to drain phase to prevent queued events from exhausting capacity

When multiple priority events arrived during an in-progress flush, each
one called shouldProceed() on the rate limiter but they all coalesced
into a single pending flush. This wasted rate limiter capacity without
performing actual flushes. Now the rate limiter is only checked when a
flush actually starts in startPendingPriorityFlushIfNeeded().

* Add missing packages declaration to RCTTester project

RCTTester uses .revenueCat and .revenueCatUI dependencies which resolve
to SPM package products in localSwiftPackage mode, but was missing the
packages: .projectPackages declaration needed to provide the package source.

Made-with: Cursor

* Fix Bundle.module resolution for RevenueCatUI snapshot tests

Use #if SWIFT_PACKAGE to select the correct resource bundle in test code:
- SPM builds (CI): Bundle.module resolves to the test target's bundle,
  which contains the test images (header.heic, background.heic)
- Tuist builds: Bundle.revenueCatUI resolves to RevenueCatUI's bundle,
  avoiding ambiguity between multiple Bundle.module definitions

Made-with: Cursor

* Remove internal jwsRepresentation from ObjC API tester

jwsRepresentation is @objc internal on StoreTransaction — it is not part
of the public API (absent from .swiftinterface files). Previously this
compiled because Tuist framework targets expose internal @objc members
in the generated -Swift.h header, but SPM packages only expose public
members.

Made-with: Cursor

* Revert "Merge remote-tracking branch 'origin/rickvdl/priority-flush-events' into default-tuist-to-local-swift-package"

This reverts commit aa585aa9c2, reversing
changes made to 7d10a496ad.

* Restore BinarySizeTest localSource to use Xcode project targets

localSource now uses .project(target:path:) like on main, with
TUIST_RC_XCODE_PROJECT=true set in CI so the workspace includes the
RevenueCat/RevenueCatUI projects. spm uses local SPM package refs.

Added documentation explaining why BinarySizeTest manages its own
dependency integration independently of Environment.dependencyMode.

Made-with: Cursor

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Facundo Menzella <facumenzella@users.noreply.github.com>
Co-authored-by: Rick van der Linden <rick.vanderlinden@revenuecat.com>
2026-03-06 16:33:28 +01:00
Alejandra WetschandAntonio Pallares 16e2b1e608 Magic Weather Example App - Files reference correction (#5397)
* Magic Weather Example App - Files reference correction

* fix xcodeproj for non-SwiftUI MagicWeather example app

---------

Co-authored-by: Antonio Pallares <antonio.pallares@revenuecat.com>
2025-07-21 14:17:17 +02:00
Antonio Pallares 05b5de447c tuist: rename tuist-generated Xcode project for MagicWeather to avoid name clashing with existing Xcode project (#5398) 2025-07-18 12:35:40 +02:00
Antonio Pallares f74872d551 Tuist: unify project settings (#5393)
* tuist: use already-defined `xcconfigFileConfigurations` `Configuration` array

* tuist: rename `project` to `app` (tuist's `Settings` object). Use `.app` or `.framework` throughout the projects in the repo

* rename settings constants
2025-07-17 20:36:59 +02:00
Facundo Menzella b5995ac1c8 Add custom change plans support for customer center (#5379) 2025-07-16 16:46:05 +02:00
Facundo Menzella 721d2b1740 Add build configurations for tuist workspace (#5364)
* chore: Remove project warnings from examples

* remove extra file

* remove run from RevneueCat and add xctestplans to workspace

* Add build configurations for project

* revert maestro

* remove storyboard

* don't add local xcconfig if not there

* remove additional files - only in workspace

* hide paywall tester scheme

* Add APITester tag

* add BackendIntegrationTestsHostApp

* fixed api testers
2025-07-11 15:31:15 +02:00
Facundo Menzella 03fbe30807 Add basics for a working tuist workspace (#5248) 2025-07-04 11:37:37 +02: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
nyeu 499ebe6b18 Feat/update swift sample apps (#4337)
* Bump SDK version, min deployment target and remove deprecated files

* Show a targeted paywall in WeatherVC and a default one in UserVC

* Update README with new features and requirements
2024-10-07 11:58:57 +02:00
NachoSoto 2bcd0ce328 5.0.0 changes: support SK2 by default 2024-07-01 14:37:21 -05:00
rglanz-rc 39746c7e2a README updates (#1856)
* README updates

Main README and MagicWeather README updated to be consistent with docs in purchases-android repository.

* Removed trello link in Features table

Removed the last link in the Features table, which led to a private/broken trello page.

* Updated Xcode min version and min iOS target

Updated Xcode minimum version from 10.2 to 13.2.
Updated minimum iOS target from 9.0 to 11.0.

* Updated minimum targets with additional devices

Updated the minimum targets under the Requirements section to include iOS (11.0+), tvOS (11.0+), macOS (10.13+), and watchOS (6.2+).
2022-08-19 16:13:38 -05:00
Joshua Liebowitz babc06fa84 Update package requirements (#1852)
pull in up to next major, fix build issue
2022-08-18 10:26:57 -07:00
NachoSoto ee2a56165f Added pre-commit hook to ensure API keys aren't committed (#1756)
Fixes [CSDK-273].
2022-07-25 11:56:59 -07:00
NachoSoto b15255a433 [skip ci] MagicWeather: updated initialization to use new Configuration.Builder (#1619) 2022-05-26 13:20:05 -07:00
NachoSoto 86dea871ac Re-enabled SK2 (#1213)
Fixes [sc-9602]
2022-01-31 11:22:12 -08:00
aboedo 1039fc04b5 update MagicWeather API calls to latest syntax (#1189)
* updated a few API calls in MagicWeather

* cleaned up a couple of docs, cleaned up `localizedIntroductoryPriceString` usage in magicWeather
2022-01-19 17:36:00 -03:00
Joshua Liebowitz 271fd11412 Update examples for api updates (#918)
Add deprecations for renamed purchase methods so Xcode can suggest the rename.
Update purchase methods for named completion block instead of _
2021-10-22 15:59:13 -07:00
Mario de Frutos Dieguez 8d98936f9a Fixes with the new RevenueCat package (#870)
* Fixes with the new RevenueCat package

Signed-off-by: Mario de Frutos <mario@defrutos.org>

* CR changes

Signed-off-by: Mario de Frutos <mario@defrutos.org>
2021-09-24 10:57:53 -03:00
Joshua Liebowitz f1dd6268c9 Merge branch 'swift_migration' into RCv4
Plus enable integration tests for CI
2021-09-03 10:35:23 -07:00
aboedo e4cf7261ec Update imports (#815)
* import Purchases -> import RevenueCat

* updated Pod name to Purchases

* updated more Pod names
2021-09-03 14:17:37 -03:00
Sundeep Manik 557cc7a7e1 updated sample app READMEs with setup instructions (#710)
* updated sample app READMEs with setup instructions

* fixed the xcodeproj name file for SwiftUI

* updated a few file locations to be clearer

* updated another file location
2021-08-04 14:16:32 -07:00
b760f2a21e Swift migration: merge changes from main (#665)
* Create CODE_OF_CONDUCT.md (#589)

Resolves #588

* Update issue templates (#537)

* Update issue templates

Looks like GitHub wants this named differently 🤷‍♂️

* Delete migration_task.md

* Update custom.md

* Update README.md (#636)

Just removing the outdated image on the readme

* ETags support (#509)

* identity v3: public-facing changes (#453)

* re-added the public-facing changes for identity v3

* updated nullability for errors in login

* temporarily removed version from PurchasesCoreSwift in Purchases.podspec

* updated sample app to use identity v3

* improved copy in RCPurchases.h

* Integration tests: Identity v3 test cases (#506)

* added extra test case for storekit tests

* added more test cases

* added a few more test cases

* slight cleanup

* added another, particularly gnarly test case

* updated test case name

* added another test case

* one more test case

* refactors and cleanups, made chained calls more reliable for one test case

* fixed name, added debug information to appUserIDs

* fixed issue with test clearing transactions when it shouldn't

* formatting

* code cleanup

* update call to replace api key and proxy url to catch issues if proxy url is empty

* updated syntax since lanes are executed in a block

* updated xcode and simulator versions for storekitTests

* updated syntax for setting log levels

* fixed fastlane changes that broke replace_in for storekit_tests

* update fastlane

* improvements from PR comments

* restricted storekit_tests to release tags and branches

* removed signing for storekittest app since it only runs in simulator

* removed storekitTestCertificate.cer since it's not needed, re-added tests just in case

* restricted storekit_tests to release branches and tags again now that they passed

* Bump addressable in /IntegrationTests/CocoapodsIntegration (#647)

Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0)

---
updated-dependencies:
- dependency-name: addressable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remove unused typedef to fix build warning (#649)

* Release: 3.12.0 (#648)

* looks like in some rebase createAlias got un-deprecated, re-deprecated it

* updated changelog and version number to 3.12.0

* added missing PR for identity v3 in changelog

* added install swiflint step to more ci jobs

* fix typo in circleci config.yml

* updated the name of the swiftlint step in xcode so it's more obvious at first glance when it fails

* fixed an issue where a few targets wouldn't compile correctly when doing carthage archive because they were pointing to unreleased versions of Purchases.

* re-added the old carthage script for archives

* added `vendor` folder to excluded directories for swiftlint

* Preparing for next version (#656)

Co-authored-by: Andy Boedo <andresboedo@gmail.com>

* added swiftlint installation to all places that were missing it (#657)

* Release: 3.12.1 (#659)

* renamed eTagInResponse -> maybeEtagInResponse to resolve conflict in some versions of Xcode

* updated version number to 3.12.1 and changelog

* added `scan_derived_data` to excluded directories for swiftlint

* Preparing for next version (#661)

Co-authored-by: Distiller <distiller@static.38.39.178.68.cyberlynk.net>

* Fix: Calling `setDebugLogsEnabled(false)` enables debug logs when it should not (#663)

* fixed a bug where setting debugLogsEnabled = false would still set them to true

* cleanup: replaced if / else with ternary operator

* reverted changes in SystemInfo initialization

* format fixes

* removed rchttpRequest

* updated call in `buildTvWatchAndMacOS`: install-gems -> install-dependencies

* undo accidental whitespace

* deleted empty RCSystemInfo.m file

Co-authored-by: Joshua Liebowitz <taquitos@users.noreply.github.com>
Co-authored-by: Corey Rabazinski <6013553+CoreyRab@users.noreply.github.com>
Co-authored-by: Cesar de la Vega <cesarvegaro@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: revenuecat-ops <60164957+revenuecat-ops@users.noreply.github.com>
Co-authored-by: Distiller <distiller@static.38.39.178.68.cyberlynk.net>
2021-07-21 13:14:33 -03:00
aboedo 0b890a7e31 Release: 3.12.0 (#648)
* looks like in some rebase createAlias got un-deprecated, re-deprecated it

* updated changelog and version number to 3.12.0

* added missing PR for identity v3 in changelog

* added install swiflint step to more ci jobs

* fix typo in circleci config.yml

* updated the name of the swiftlint step in xcode so it's more obvious at first glance when it fails

* fixed an issue where a few targets wouldn't compile correctly when doing carthage archive because they were pointing to unreleased versions of Purchases.

* re-added the old carthage script for archives

* added `vendor` folder to excluded directories for swiftlint
2021-07-15 11:26:31 -03:00
aboedo 956da62144 identity v3: public-facing changes (#453)
* re-added the public-facing changes for identity v3

* updated nullability for errors in login

* temporarily removed version from PurchasesCoreSwift in Purchases.podspec

* updated sample app to use identity v3

* improved copy in RCPurchases.h
2021-07-13 14:43:08 -03:00
Joshua Liebowitz ef1dd6ae86 Use main branch for all the things instead of develop (#521) 2021-06-09 10:33:38 -07:00
aboedo d0ac5b9b42 Fix: CI automations with pre-release versions (#514)
* update fastlane

* fixed issues with the automations when reading pre-release version numbers
2021-06-03 18:08:44 -03:00
Cody Kerns 24684075b9 PurchasesDelegate implementation
Error printing
2021-01-14 14:34:18 -05:00
Cody Kerns bb39fafc96 Updates Purchases SDK to 3.10.1
Enables debug logs
Improves entitlement setup
2021-01-12 12:34:23 -05:00
Cody Kerns 8525ea1d12 fixes some interface builder bugs from the project rename 2021-01-11 17:07:01 -05:00
Cody Kerns d2bf4b6642 Uncomment error line for api key 2021-01-11 15:54:14 -05:00
Cody Kerns ae52497480 Removes space from Magic Weather directory/files 2021-01-11 15:29:52 -05:00