diff --git a/RevenueCat.xcodeproj/project.pbxproj b/RevenueCat.xcodeproj/project.pbxproj index 9da6035a89..e62bd883ad 100644 --- a/RevenueCat.xcodeproj/project.pbxproj +++ b/RevenueCat.xcodeproj/project.pbxproj @@ -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; @@ -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 = ""; diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj b/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj index 3bf18c548f..ab9d215c96 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester.xcodeproj/project.pbxproj @@ -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; @@ -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; diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift b/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift index 73545f344c..68f48c1ed3 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift @@ -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) } diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester/Views/OfferingsList.swift b/Tests/TestingApps/PaywallsTester/PaywallsTester/Views/OfferingsList.swift index f84e38c37b..88bf029439 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester/Views/OfferingsList.swift +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester/Views/OfferingsList.swift @@ -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) } diff --git a/Tests/TestingApps/PaywallsTester/ci_scripts/ci_pre_xcodebuild.sh b/Tests/TestingApps/PaywallsTester/ci_scripts/ci_pre_xcodebuild.sh index 03f6e17d48..fb9a074ac2 100755 --- a/Tests/TestingApps/PaywallsTester/ci_scripts/ci_pre_xcodebuild.sh +++ b/Tests/TestingApps/PaywallsTester/ci_scripts/ci_pre_xcodebuild.sh @@ -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"