[Draft] Remove the RevenueCat and RevenueCatUI targets in RevenueCat.xcodeproj.
Motivation
Broadly, I think these targets are probably causing more confusion than anything, since I suspect they aren't actually used.
More specifically, in order to run our paywall validation tests (TakeScreenshotTests) on macOS, we will need to move the screenshot generation to a target in the Xcode project, from the current RevenueCatUI test target defined in the Package.swift. This is because test targets in a Package.swift cannot be run inside a host application, and in order to interact with UI API's on macOS, your tests must run inside a host application.
So, we need to be able to actually add a dependency on RevenueCat and RevenueCatUI frameworks in a target in the Xcode project, and currently that's broken by these duplicated targets (or that's my hypothesis).
Description
The RevenueCat and RevenueCatUI targets defined in RevenueCat.xcodeproj duplicate the RevenueCat and RevenueCatUI targets defined in Package.swift, and when adding them to other targets in RevenueCat.xcodeproj, it causes build issues related to multiple sources for build items.
My hunch is that these are not actually actively being used any more. The two targets where they were being referenced (BackendIntegrationTests and StoreKitUnitTests) did not actually embed them. I could be wrong though, so part of the goal with this PR is to see the behavior of all the automated tests, and see if anything breaks.
| 1 Error | |
|---|---|
| :no_entry_sign: | Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other. |
| Label | Description |
|---|---|
| pr:feat | A new feature. Use along with pr:breaking to force a major release. |
| pr:fix | A bug fix. Use along with pr:force_minor to force a minor release. |
| pr:other | Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release. |
| pr:RevenueCatUI | Use along any other tag to mark a PR that only contains RevenueCatUI changes |
| pr:next_release | Preparing a new release |
| pr:dependencies | Updating a dependency |
| pr:phc_dependencies | Updating purchases-hybrid-common dependency |
Generated by :no_entry_sign: Danger
📸 Snapshot Test
216 unchanged
| Name | Added | Removed | Modified | Renamed | Unchanged | Errored | Approval |
|---|---|---|---|---|---|---|---|
| RevenueCat com.revenuecat.PaywallsTester |
0 | 0 | 0 | 0 | 216 | 0 | N/A |
:flying_saucer: Powered by Emerge Tools
Just to keep this PR up to date with the discussion in Slack:
Mostly got this working, but the biggest hangup is Carthage support. Carthage is using those existing RevenuCat and RevenueCatUI targets. I tried building a little wrapper framework that imports and then re-exports the SwiftPM version, but Carthage wasn't really liking it. I think there's a path here – maybe by distributing for carthage using prebuilt frameworks, but I feel like it's a rabbit hole and has the potential to affect customers in subtle ways. It's a shame, because I'm so close to just having one framework definition to rule them all!
Sounds like there may be some appetite for dropping Carthage support, so that's another possible route here.