Commit Graph
7 Commits
Author SHA1 Message Date
Josh Holtz 8a4645b41a Render packages, package, and purchase button views for paywall components (#4324)
* Views be viewing

* Fixed lint

* Add swift flag check

* Fixed compile issue from rebase

* Made view models internal

* Fixed a bunch of merge issues

* Fix some compile stuff

* Fix things
2024-10-16 10:59:44 -05:00
dd0ee262ea [Customer Center] Initial implementation (#3967)
Alpha of the Customer Center. In this branch, it's been disabled behind
a compilation flag.

---------

Co-authored-by: Will Taylor <wtaylor151@gmail.com>
Co-authored-by: James Borthwick <109382862+jamesrb1@users.noreply.github.com>
Co-authored-by: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com>
Co-authored-by: JayShortway <29483617+JayShortway@users.noreply.github.com>
Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Co-authored-by: Cody Kerns <44073103+codykerns@users.noreply.github.com>
Co-authored-by: Andy Boedo <andresboedo@gmail.com>
2024-08-09 15:26:55 +02:00
NachoSoto 2bcd0ce328 5.0.0 changes: support SK2 by default 2024-07-01 14:37:21 -05:00
James BorthwickandCesar de la Vega 1499538d33 Xcode project with RevenueCatUI + Tests (#3960)
### RevenueCatUI and its tests are now accessible in the files
navigator:

<img width="555" alt="image"
src="https://github.com/RevenueCat/purchases-ios/assets/109382862/a4067d0a-62e5-43b2-bf77-a8a7ee1dd16e">

### It add two new schemes:

<img width="384" alt="image"
src="https://github.com/RevenueCat/purchases-ios/assets/109382862/94b80848-5cc3-4abc-b132-345d79a6f143">

Use RevenueCatUIDev to build RevenueCatUI, and RevenueCatUITests to run
its tests.

### Linting works:

<img width="716" alt="image"
src="https://github.com/RevenueCat/purchases-ios/assets/109382862/aacfa0bf-84af-494e-a4b1-9434de69b4f8">

### Individual tests can be run from the UI:

<img width="999" alt="image"
src="https://github.com/RevenueCat/purchases-ios/assets/109382862/902c5167-d352-4e6d-a848-c5d6c0e988de">

## N.B.

- Tests must be run via the RevenueCatUITest scheme.
- Xcode sometimes has difficulties switching schemes. If you see the
errors below, **clean the build folder** and try again and it will work
<img width="822" alt="image"
src="https://github.com/RevenueCat/purchases-ios/assets/109382862/0ac8dd77-676c-46e4-bc76-f8edf86f5a79">
- Building with the RevenueCatUIDev scheme creates some warnings related
to switches. Adding in an `@unknown default:` resolves the warning but
causes an error in other configurations ("Default will never be
executed").
<img width="801" alt="image"
src="https://github.com/RevenueCat/purchases-ios/assets/109382862/dcba6e0c-5755-4e5a-b940-ca270242b6bb">
- Because the root Package file was not altered, this PR won't have any
affect on how our package works when integrated via SPM.

---------

Co-authored-by: Cesar de la Vega <cesarvegaro@gmail.com>
2024-06-18 13:14:46 -07:00
NachoSoto 7087218ed6 Xcode: removed purchases-ios SPM reference (#3166)
The project no longer depends on `purchases-ios` through SPM.
This was needed for 2 reasons:
- `v3LoadShedderIntegration`
- `BackendCustomEntitlementsIntegrationTests`

Both of these depend on `RevenueCat_CustomEntitlementComputation`, which
is only an SPM library.

This solution allows us to build it but without having to clone the repo
separately through a dependency, and instead embedding a reference to
the _local_ Package.
`v3LoadShedderIntegration` depended on the 3.x release, so I've simply
removed it from the workspace. It can still be modified and ran directly
by opening the project.

This solves at least 2 major current annoyances:
- Compiling `BackendIntegrationTests` lead to compile errors because the
local changes weren't seen when building
`RevenueCat_CustomEntitlementComputation`.
- Switching branches was always frustrating, as Xcode tried to modify
`RevenueCat.xcworkspace/xcshareddata/swiftpm/Package.resolved` to point
to the latest commit in `main`, sometimes even making it crash.

⚠️ *This might also help with the timeouts when cloning the repo, since
SPM was probably resolving our repo twice through the transitive
dependency.*

#### New setup:
<img width="260" alt="Screenshot 2023-09-07 at 15 01 53"
src="https://github.com/RevenueCat/purchases-ios/assets/685609/7670b341-fc90-45e4-adda-6a9bd4d5656c">
2023-09-08 08:58:29 -07:00
NachoSoto 69fd1e6318 SPM: update Package.resolved (#3130)
This updates:
- `swift-snapshot-testing`
- `purchases-ios`

Updating our own commit fixes this issue that could happen if you didn't
"update to latest package versions" locally:
![Screenshot 2023-08-31 at 12 57
43](https://github.com/RevenueCat/purchases-ios/assets/685609/5873c3d7-2efc-4efa-9ce2-3b3899c116c9)
2023-08-31 14:59:57 -07:00
NachoSoto aea011461a Add SPM Package.resolved for Xcode Cloud (#2844)
This is required for Xcode Cloud:

> a resolved file is required when automatic dependency resolution is
disabled and should be placed at
/Volumes/workspace/repository/RevenueCat.xcworkspace/xcshareddata/swiftpm/Package.resolved.
Running resolver because the following dependencies were added:
'purchases-ios' (https://github.com/RevenueCat/purchases-ios)fatalError
2023-07-23 20:20:12 +02:00