RevenueCat / purchases-ios

In-app purchases and subscriptions made easy. Support for iOS, watchOS, tvOS, macOS, and visionOS.
https://www.revenuecat.com/
MIT License
2.32k stars 315 forks source link

Preprocessor to make select constructs public #3880

Closed jamesrb1 closed 4 months ago

jamesrb1 commented 5 months ago

This PR allows the Paywalls Tester app to access some items internal to purchases-ios by temporarily marking them public during complication.

Items that need to be public have been annotated with \\@PublicForExternalTesting.

The Paywalls Tester project runs a script, Preprocessor.sh, as a pre-action to add public to all classes/structs/enums/functions/inits that have been annotated.

After compilation it runs a second script, Postprocessor.sh, as a post-action to undo these changes so that they don't accidentally get checked in.

The first script is run as a scheme pre-action rather than as a run script build phase, because when run as a build phase the changes to the files aren't picked up until the next compilation attempt.

image

It also changes the archive step to be built with a release configuration, and removes the use of @testable import for debug builds.

resolves PWL-459

RevenueCat-Danger-Bot commented 5 months ago
1 Message
:book: Size increase: 7.76 KB

Generated by :no_entry_sign: Danger