Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix paywall tester but passing another flag #4483

Closed
wants to merge 11 commits into from
2 changes: 2 additions & 0 deletions RevenueCat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6956,6 +6956,7 @@
);
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "-DPAYWALL_COMPONENTS";
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.Purchases;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
RUN_DOCUMENTATION_COMPILER = YES;
Expand Down Expand Up @@ -6995,6 +6996,7 @@
"@loader_path/Frameworks",
);
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "-DPAYWALL_COMPONENTS";
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.Purchases;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "";
OTHER_SWIFT_FLAGS = "-DPAYWALL_COMPONENTS";
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.PaywallsTester;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
Expand Down Expand Up @@ -693,7 +693,7 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "";
OTHER_SWIFT_FLAGS = "-DPAYWALL_COMPONENTS";
PRODUCT_BUNDLE_IDENTIFIER = com.revenuecat.PaywallsTester;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ struct APIKeyDashboardList: View {
VStack {
Text(Self.modesInstructions)
.font(.footnote)
#if PAYWALL_COMPONENTS
Text("Paywalls V2 Enabled")
#endif
self.list(with: data)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ struct OfferingsList: View {
VStack {
Text(Self.modesInstructions)
.font(.footnote)
#if PAYWALL_COMPONENTS
Text("Paywalls V2 Enabled")
#endif
self.list(with: data)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ echo "Replacing API keys on PaywallsTester"
file="$SCRIPT_DIR/../PaywallsTester/Config/ConfigItem.swift"
sed -i '' 's/static var apiKey: String { "" }/static var apiKey: String { "'"$REVENUECAT_XCODE_CLOUD_RC_APP_API_KEY"'" }/' $file

echo "Enabling PAYWALL_COMPONENTS compiler flag"
echo "SWIFT_ACTIVE_COMPILATION_CONDITIONS = \$(inherited) PAYWALL_COMPONENTS" > "$SCRIPT_DIR/../Local.xcconfig"
# This allow Local.xcconfig to be found by Xcode
xcconfig_file="$(cd "$SCRIPT_DIR/../../../../" && pwd)/Local.xcconfig"

# echo "Enabling PAYWALL_COMPONENTS compiler flag in $xcconfig_file"
# echo "SWIFT_ACTIVE_COMPILATION_CONDITIONS = \$(inherited) PAYWALL_COMPONENTS\nOTHER_SWIFT_FLAGS = PAYWALL_COMPONENTS" > "$xcconfig_file"