Compare commits
8 Commits
d13094c662
...
d60cce83c9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d60cce83c9 | ||
|
|
c03d2b969c | ||
|
|
4af4450b94 | ||
|
|
6be4bed2e0 | ||
|
|
1b6d40627d | ||
|
|
67a7d1ad2a | ||
|
|
4ef550f48b | ||
|
|
993a5870c5 |
85
.gitea/workflows/deploy-ios.yaml
Normal file
85
.gitea/workflows/deploy-ios.yaml
Normal 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"
|
||||
BIN
assets/icons/Icône de l'application.png
Normal file
BIN
assets/icons/Icône de l'application.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
BIN
assets/icons/presentation_image.jpg
Normal file
BIN
assets/icons/presentation_image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 182 KiB |
@@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user