Compare commits

...

8 Commits

Author SHA1 Message Date
Van Leemput Dayron
d60cce83c9 Firebase IOS distrivution
Some checks are pending
Deploy Flutter to Firebase iOS (Mac) / deploy-ios (push) Waiting to run
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 3m39s
2026-01-10 19:18:38 +01:00
Van Leemput Dayron
c03d2b969c preparing to deploy on ios 2026-01-03 16:25:33 +01:00
Van Leemput Dayron
4af4450b94 feat: add Firebase Analytics and make Google Maps Flutter dependencies direct.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 3m23s
2026-01-02 17:27:27 +01:00
Van Leemput Dayron
6be4bed2e0 Merge branch 'main' into release 2026-01-02 17:26:26 +01:00
Van Leemput Dayron
1b6d40627d feat: Switch API key retrieval from flutter_dotenv to firebase_options.dart and update build version.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 3m4s
2025-12-30 17:10:12 +01:00
Van Leemput Dayron
67a7d1ad2a feat: Streamline Google Maps API key retrieval and update Google Maps Flutter dependencies.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 2m48s
2025-12-30 16:56:13 +01:00
Van Leemput Dayron
4ef550f48b Fix theme in settings
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 2m59s
2025-12-30 16:34:05 +01:00
Van Leemput Dayron
993a5870c5 fix: enhance missing Google Maps API key error message with debug details including available keys and platform information.
All checks were successful
Deploy Flutter to Firebase (Mac) / deploy-android (push) Successful in 2m53s
2025-12-30 16:23:56 +01:00
6 changed files with 106 additions and 15 deletions

View File

@@ -0,0 +1,85 @@
name: Deploy Flutter to Firebase iOS (Mac)
on:
push:
branches: release
jobs:
deploy-ios:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Configurer Xcode
# Optionnel : force une version spécifique si besoin
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Installer les dépendances Flutter & Cocoapods
run: |
flutter pub get
cd ios
pod install --repo-update
cd ..
- name: Créer les fichiers secrets
run: |
echo "${{ secrets.ENV_FILE }}" > .env
printf '%s' '${{ secrets.FIREBASE_CREDENTIALS }}' > ./ios/firebase_credentials.json
- name: Préparer le Code Signing (Certificats)
env:
P12_CERTIFICATE_BASE64: ${{ secrets.IOS_P12_BASE64 }}
P12_PASSWORD: ${{ secrets.IOS_P12_PASSWORD }}
PROVISIONING_PROFILE_BASE64: ${{ secrets.IOS_PROVISION_BASE64 }}
KEYCHAIN_PASSWORD: "temporary_password"
run: |
# 1. Créer un Keychain temporaire
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security set-keychain-settings -t 3600 -u build.keychain
# 2. Importer le certificat .p12
echo "$P12_CERTIFICATE_BASE64" | base64 -D -o certificate.p12
security import certificate.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" build.keychain
# 3. Importer le Profil de Provisionnement
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
echo "$PROVISIONING_PROFILE_BASE64" | base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/distribution.mobileprovision
- name: Lancer Fastlane & Build IPA
working-directory: ./ios
env:
FIREBASE_IOS_APP_ID: ${{ secrets.FIREBASE_IOS_APP_ID }}
run: |
# 1. Config Ruby (Identique à ton script Android)
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export GEM_HOME=$PWD/vendor/bundle
export GEM_PATH=$PWD/vendor/bundle
export PATH=$GEM_HOME/bin:$PATH
# 2. Installation Fastlane
rm -rf vendor Gemfile.lock .bundle
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'fastlane', '>= 2.210.0'" >> Gemfile
echo "gem 'fastlane-plugin-firebase_app_distribution'" >> Gemfile
echo "gem 'base64'" >> Gemfile
bundle install --path vendor/bundle
# 3. Construction de l'IPA via Flutter
cd ..
# On génère l'IPA. Flutter s'occupe de trouver le certificat dans le keychain
flutter build ipa --release --export-method ad-hoc
cd ios
# 4. Envoi vers Firebase
echo "🚀 Envoi de l'IPA vers Firebase..."
bundle exec fastlane run firebase_app_distribution \
app:"$FIREBASE_IOS_APP_ID" \
ipa_path:"../build/ios/ipa/*.ipa" \
service_credentials_file:"firebase_credentials.json" \
release_notes:"Build iOS via Act"

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

View File

@@ -150,7 +150,9 @@ class ProfileContent extends StatelessWidget {
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.black87,
color: Theme.of(context).brightness == Brightness.dark
? Colors.white
: Colors.black87,
),
),
],

View File

@@ -1,7 +1,7 @@
import 'dart:io';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:flutter_dotenv/flutter_dotenv.dart';
import '../firebase_options.dart'; // Add this import
import '../models/activity.dart';
import '../services/error_service.dart';
import '../services/logger_service.dart';
@@ -16,16 +16,14 @@ class ActivityPlacesService {
final ErrorService _errorService = ErrorService();
static String get _apiKey {
if (Platform.isAndroid) {
return dotenv.env['GOOGLE_MAPS_API_KEY_ANDROID'] ??
dotenv.env['GOOGLE_MAPS_API_KEY'] ??
'';
} else if (Platform.isIOS) {
return dotenv.env['GOOGLE_MAPS_API_KEY_IOS'] ??
dotenv.env['GOOGLE_MAPS_API_KEY'] ??
'';
try {
return DefaultFirebaseOptions.currentPlatform.apiKey;
} catch (e) {
LoggerService.error(
'ActivityPlacesService: Impossible de récupérer la clé API Firebase: $e',
);
return '';
}
return dotenv.env['GOOGLE_MAPS_API_KEY'] ?? '';
}
/// Recherche des activités près d'une destination
@@ -116,7 +114,13 @@ class ActivityPlacesService {
LoggerService.error(
'ActivityPlacesService: Clé API Google Maps manquante',
);
throw Exception('Clé API Google Maps non configurée');
throw Exception(
'Clé API Google Maps non configurée dans DefaultFirebaseOptions. Platform: ${Platform.isAndroid
? 'Android'
: Platform.isIOS
? 'iOS'
: 'Autre'}',
);
}
final encodedDestination = Uri.encodeComponent(destination);

View File

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 2025.12.1+1
version: 2026.1.1+1
environment:
sdk: ^3.9.2
@@ -95,8 +95,8 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/icons/
- .env
- assets/icons/
- .env
#- assets/images/
# An image asset can refer to one or more resolution-specific "variants", see