From e780f15f161a219d29d3f037a99ba54ed8a33845 Mon Sep 17 00:00:00 2001 From: Ashleigh Kaffenberger Date: Wed, 1 Jun 2022 16:35:37 -0400 Subject: [PATCH] #29 modify script to rename frameworks --- .scripts/package.sh | 10 ++++++++++ README.md | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.scripts/package.sh b/.scripts/package.sh index e84be91..7c7a2d2 100755 --- a/.scripts/package.sh +++ b/.scripts/package.sh @@ -53,6 +53,15 @@ create_scratch () { trap "if [[ \$debug ]]; then read -p \"\"; fi; rm -rf \"$scratch\"" EXIT } +rename_frameworks () { + local prefix="$1" + for i in */*.xcframework; do ( + local name=$(xcframework_name $i) + cd "$i/../"; mv "$name.xcframework" "$prefix$name.xcframework" + ) & done; + wait +} + zip_frameworks () { for i in */*.xcframework; do ( local name=$(xcframework_name $i) @@ -293,6 +302,7 @@ if [[ $latest != $current || $debug ]]; then unzip -q Firebase.zip echo "Preparing xcframeworks for distribution..." cd Firebase + rename_frameworks "_" zip_frameworks echo "Creating distribution files..." prepare_files_for_distribution "../$distribution" diff --git a/README.md b/README.md index c94896d..2630a8d 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ The script performs the following actions: - Generate the swift package: `$ cd .scripts && sh package.sh debug skip-release` ## Running the iOS Example -- [Setup a firebase project](https://firebase.google.com/docs/ios/setup), and add your `GoogleService-Info.plist` to the project. Make sure the services you want to use are enabled (FirebaseAuth, Firestore, In App Messaging, etc.) +- [Setup a firebase project](https://firebase.google.com/docs/ios/setup). Make sure the services you want to test are enabled (FirebaseAuth, Firestore, In App Messaging, etc.) +- Download and add your `GoogleService-Info.plist` to the iOS Example project. - Open the iOS Example.xcworkspace, build and run the iOS Example target