workflows: ios-workflow: name: Flutter iOS Build max_build_duration: 60 instance_type: mac_mini_m1 environment: flutter: stable xcode: latest cocoapods: default vars: # Bundle ID et nom de l'app BUNDLE_ID: "fr.geosector.app2" APP_NAME: "GeoSector" # Variables App Store Connect (à configurer dans Codemagic) APP_STORE_CONNECT_ISSUER_ID: Encrypted(...) APP_STORE_CONNECT_KEY_IDENTIFIER: Encrypted(...) APP_STORE_CONNECT_PRIVATE_KEY: Encrypted(...) CERTIFICATE_PRIVATE_KEY: Encrypted(...) groups: - appstore_credentials # Groupe contenant les secrets Apple triggering: events: - push branch_patterns: - pattern: main include: true source: true cache: cache_paths: - $HOME/.pub-cache - $HOME/Library/Caches/CocoaPods scripts: - name: Set up Flutter script: | flutter --version - name: Clean and prepare project script: | flutter clean rm -rf ios/Pods rm -rf ios/Podfile.lock rm -rf ios/.symlinks rm -rf ios/Flutter/Flutter.framework rm -rf ios/Flutter/Flutter.podspec flutter pub get - name: Setup iOS dependencies script: | cd ios flutter precache --ios pod cache clean --all pod repo update pod install --repo-update --verbose - name: Flutter analyze script: | flutter analyze - name: Set up code signing script: | # Codemagic gère automatiquement la signature avec les certificats fournis xcode-project use-profiles - name: Build iOS script: | flutter build ios --release --no-codesign artifacts: - build/ios/**/*.app - build/ios/ipa/*.ipa - build/ios/archive/*.xcarchive - /tmp/xcodebuild_logs/*.log - ios/Pods/Podfile.lock publishing: email: recipients: - votre.email@example.com # Remplacez par votre email notify: success: true failure: true # App Store Connect app_store_connect: api_key: $APP_STORE_CONNECT_PRIVATE_KEY key_id: $APP_STORE_CONNECT_KEY_IDENTIFIER issuer_id: $APP_STORE_CONNECT_ISSUER_ID submit_to_testflight: true submit_to_app_store: false