-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Paywalls
: SimpleApp reads API key from Xcode Cloud environment (#2919)
This will allow us to automatically make new releases from the `paywalls` branch. See [docs](https://developer.apple.com/documentation/xcode/writing-custom-build-scripts). <img width="553" alt="Screenshot 2023-07-30 at 10 55 47" src="https://github.com/RevenueCat/purchases-ios/assets/685609/d40a00e7-6a57-4340-8160-d903d765b814">
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
Tests/TestingApps/SimpleApp/ci_scripts/ci_pre_xcodebuild.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash -e | ||
|
||
SIMPLE_APP_API_KEY=$REVENUECAT_XCODE_CLOUD_SIMPLE_APP_API_KEY | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
if [ -z "$SIMPLE_APP_API_KEY" ]; then | ||
echo "SimpleApp API key environment variable is not set." | ||
else | ||
echo "Replacing API key on SimpleApp" | ||
|
||
file="$SCRIPT_DIR/../SimpleApp/Configuration.swift" | ||
sed -i.bak 's/private static let apiKeyFromCI = ""/private static let apiKeyFromCI = "'$SIMPLE_APP_API_KEY'"/g' $file | ||
rm $file.bak | ||
fi |