Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ app.*.map.json
android/app/google-services.json
ios/Runner/GoogleService-Info.plist
ios/firebase_app_id_file.json
lib/firebase_options.dart
lib/firebase_options.dart
scripts/*.plist
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ The Silent Shard mobile app is an MPC-based Threshold Signer app as a usable, se
- Navigate to the project directory
- Install dependencies: `flutter pub get`
- Run the app: `flutter run`

### Build
- Build the app:
- Android: `./build_android.sh [stg|prod]`
- iOS: `./build_ios.sh [stg|prod]`

- Before building the app using the scripts, make sure to update the version in `pubspec.yaml` and copy `GoogleService-Info_<environment>.plist` into `scripts` (iOS only), you could find the file in the [Firebase console](https://console.firebase.google.com/u/0/project/mobile-wallet-mm-snap-staging/settings/general/ios:com.silencelaboratories.silentshard).
21 changes: 21 additions & 0 deletions scripts/build_android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
set -e
DIR=$(dirname $0)

if [ -z "$1" ] || [ "$1" = "--help" ]; then
echo "Usage: ./build_android.sh [stg|prod]"
exit 1
fi

if [ "$1" = "stg" ]; then
echo "Building for staging"

flutter build apk --release
elif [ "$1" = "prod" ]; then
echo "Building for prod"

flutter build appbundle
else
echo "Invalid argument. Please use 'stg' or 'prod'"
exit 1
fi
35 changes: 35 additions & 0 deletions scripts/build_ios.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh
set -e
DIR=$(dirname $0)

if [ -z "$1" ] || [ "$1" = "--help" ]; then
echo "Usage: ./build_ios.sh [stg|prod]"
exit 1
fi

if [ "$1" = "stg" ]; then
echo "Building for staging"

if [ ! -f "$DIR/GoogleService-Info_stg.plist" ]; then
echo "GoogleService-Info_stg.plist not found! Please add it to the scripts folder"
exit 1
fi

cp $DIR/GoogleService-Info_stg.plist ios/Runner/GoogleService-Info.plist

flutter build ipa
elif [ "$1" = "prod" ]; then
echo "Building for prod"

if [ ! -f "$DIR/GoogleService-Info_prod.plist" ]; then
echo "GoogleService-Info-prod.plist not found! Please add it to the scripts folder"
exit 1
fi

cp $DIR/GoogleService-Info_prod.plist ios/Runner/GoogleService-Info.plist

flutter build ipa
else
echo "Invalid argument. Please use 'stg' or 'prod'"
exit 1
fi