Skip to content

Commit

Permalink
Updated readme with firebase instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Van Zelst committed Oct 13, 2023
1 parent 89d4c3a commit 30affef
Showing 1 changed file with 32 additions and 28 deletions.
60 changes: 32 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,56 +38,55 @@ flutter:

Command to run to update the translations
```
flutter packages pub run icapps_translations
fvm flutter packages pub run icapps_translations
```

## Json Serializable & Kiwi

```
flutter packages pub run build_runner build
flutter packages pub run build_runner build --delete-conflicting-outputs
flutter packages pub run build_runner watch
fvm flutter packages pub run build_runner build --delete-conflicting-outputs
fvm flutter packages pub run build_runner watch
```
## Environments

`--release` is not available for emulators. Performance will be better

### Dev, Debug
```
flutter run --flavor dev -t lib/main.dart
fvm flutter run --flavor dev -t lib/main.dart
flutter run --release --flavor dev -t lib/main.dart
fvm flutter run --release --flavor dev -t lib/main.dart
```

### Dummy

Note: a hot reload is required after launch to use the correct launch file.

```
flutter run --flavor dev -t lib/main_dummy.dart
fvm flutter run --flavor dev -t lib/main_dummy.dart
flutter run --release --flavor dev -t lib/main_dummy.dart
fvm flutter run --release --flavor dev -t lib/main_dummy.dart
```

### Alpha
```
flutter run --flavor alpha -t lib/main_alpha.dart
fvm flutter run --flavor alpha -t lib/main_alpha.dart
flutter run --release --flavor alpha -t lib/main_alpha.dart
fvm flutter run --release --flavor alpha -t lib/main_alpha.dart
```

### Beta
```
flutter run --flavor beta -t lib/main_beta.dart
fvm flutter run --flavor beta -t lib/main_beta.dart
flutter run --release --flavor beta -t lib/main_beta.dart
fvm flutter run --release --flavor beta -t lib/main_beta.dart
```

### Prod, Release
```
flutter run --flavor prod -t lib/main_prod.dart
fvm flutter run --flavor prod -t lib/main_prod.dart
flutter run --release --flavor prod -t lib/main_prod.dart
fvm flutter run --release --flavor prod -t lib/main_prod.dart
```

## Niddler
Expand All @@ -100,7 +99,7 @@ Niddler is also available for Android & Java (OkHttp: https://github.com/icapps/

## Linting

To check your code matches our linting. The analysis_options.yaml contains all our code checks.
To check your code matches our linting. The `analysis_options.yaml` contains all our code checks.

```
flutter analyze
Expand All @@ -111,13 +110,13 @@ flutter analyze
In order to run our test we need to run

```
flutter test
fvm flutter test
```

If we want to update our golden files we need to run

```
flutter test --update-goldens
fvm flutter test --update-goldens
```

## Fastlane
Expand All @@ -135,15 +134,20 @@ This script will run a dart script. The dart script itself will ask you some inp

#### Add provisioning files

```
place the provisioning profiles -> provision_profile/**
naming should be the same as provided in the iOS/Configuration/** files (underscore will be replaced with a space in the configuration files)
```
Add the provisioning profiles in the ios/provisioning/** folder. The naming of the files should be the same as provided in the ios/Configuration/** files (underscore will be replaced with a space in the configuration files)

#### Firebase

To setup firebase you would need to add a few files which could be downloaded after setting-up your firebase project.

For iOS add a `GoogleService-Info-{flavor}.plist` file for each flavor in the ios/Configuration/GoogleService/** folder. Whenever the project is run with a different flavor it will automatically copy the correct `GoogleService-Info-{flavor}.plist` file into the ios/Runnur/** folder.

For Android add the `google-services.json` file in the android/app/src/** folder.

#### Languages

```
Configure the required languages in xCode
Configure the required languages in Xcode
```

### icapps Translations
Expand All @@ -157,34 +161,34 @@ Update the translations.py file (edit the todos)
Obfuscation is enabled by default when using fastlane for building. The symbol files are stored in
`./build/debug-info/#{options[:flavor]}`

**Important**: Add the following regex to jenking configuration to also archive the symbol files
**Important**: Add the following regex to jenkins configuration to also archive the symbol files
```
**/*.symbols
```

### Icons

Replace the files in assets_launcher_icons/
Replace the files in the `assets_launcher_icons/**` folder.

You can also change the adaptive_icon_background in the flutter_launcher_icons-{flavor}.yaml (currently "#CB2E63") (only available for Android 8.0 devices and above)
You can also change the adaptive_icon_background in the `flutter_launcher_icons-{flavor}.yaml` (currently "#CB2E63") (only available for Android 8.0 devices and above)

After this, run the following command

```
flutter pub run flutter_launcher_icons:main -f flutter_launcher_icons-dev.yaml
fvm flutter pub run flutter_launcher_icons:main -f flutter_launcher_icons-dev.yaml
```

### Common issues

```
No Flavor provided
No flavor provided
```

Add a flavor to your configuration. Extra info can be found in this issue -> https://github.com/icapps/flutter-template/issues/3

### Questions?

For question contact Koen Van Looveren
For question contact William Verhaeghe

### Finish

Expand Down

0 comments on commit 30affef

Please sign in to comment.