"Target debug_ios_bundle_flutter_assets Failed to codesign App.framework/App with identity -."
Bonjour,
Je fais face à un problème sur un build iOS de mon application flutter. Le build Android s’est bien passé.
L’application est déjà sur playstore en tests fermés.
Je travaille sur une application avec firebase / firestore / flutterfire
le log court sur terminal après un
flutter build ios -v
j’obtiens
Target debug_ios_bundle_flutter_assets failed: Exception: Failed to codesign /Users/pierrecherbero/Library/Developer/Xcode/DerivedData/Runner-biyruxvfhiqmqcbcygerswaqubar/Build/Products/Debug-iphonesimulator/App.framework/App with identity -
Pourtant mon application est signée.
J’ai enlevé les alpha des png, trouvé un doublon et refait la manip après un nettoyage.
Rien ne résout le problème. J’ai construit mes icônes Google avec Android et Apple avec XCode, néanmoins il y a a eu en amont une première manip avec flutter_launcher_icons…
Peut-être creuser un peu plus par là ?
En retirant dans xCode le script dans Target>Build Phases>Run Script :
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build
le build marche en simulateur mais pas sur mon iphone.
Ce n’est de toute façon pas une solution vu que je souhaite… le mettre en production.
Néanmoins quand j’essaie de basculer sur mon iphone j’obtiens cette erreur.
Parse Issue (Xcode): Expected parameter declarator
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:41:25
[ ] Parse Issue (Xcode): Expected ')'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:41:25
[ ] Parse Issue (Xcode): Expected parameter declarator
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:41:37
[ ] Parse Issue (Xcode): Expected ')'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:41:37
[ ] Parse Issue (Xcode): Expected function body after function declarator
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:42:0
[ ] Semantic Issue (Xcode): Missing context for method declaration
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:51:0
[ ] Parse Issue (Xcode): Expected method body
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:53:0
[ ] Semantic Issue (Xcode): Missing context for method declaration
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:54:0
[ ] Parse Issue (Xcode): Expected method body
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:57:0
[ ] Semantic Issue (Xcode): Missing context for method declaration
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:60:0
[ ] Parse Issue (Xcode): Expected method body
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:66:0
[ ] Semantic Issue (Xcode): Missing context for method declaration
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:73:0
[ ] Parse Issue (Xcode): Expected method body
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:80:0
[ ] Parse Issue (Xcode): Unexpected '@' in program
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:83:0
[ ] Parse Issue (Xcode): Unexpected '@' in program
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:88:0
[ ] Parse Issue (Xcode): Expected ':'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:95:84
[ ] Semantic Issue (Xcode): Missing context for method declaration
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:95:0
[ ] Parse Issue (Xcode): Expected method body
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:95:84
[ ] Parse Issue (Xcode): Expected ':'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Fr
ameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:103:140
[ ] Error (Xcode): too many errors emitted, stopping now
[ ] Parse Issue (Xcode): Could not build module 'WebKit'
/Users/pierrecherbero/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.9.1/ios/Classes/FWFWebViewHostApi.h:5:8
[ +1 ms] "flutter ios" took 33 864ms.
[ +1 ms] Encountered error while building for device.
[ ]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:665:7)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1297:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:115:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
J’utilise webview_flutter: ^4.2.2
Cette erreur semble relié à un bug avec webview_flutter_wkwebview mais j’utilise la version de CocoaPods 1.13.0
Cette application a plusieurs assets dans
flutter:
uses-material-design: true
assets:
- assets/
- assets/icons/
Malgré la issue trouvée ici :
ou encore ici
ou encore pratiqué la solution d’effacer le dossier ios après avoir mis de côté le Runner.
- Quit Xcode.
- rm -rf ~/.cocoapods/repos/trunk/
- Delete project’s temp files located at ~/Library/Developer/Xcode/DerivedData
- Backup Runner folder
- Delete the ios folder
- Go to a terminal and execute flutter create . in the flutter project folder
- Paste your Runner folder back into the ios folder
- Open Xcode and add GooglePList to /Runner
- Update Version/Name/iOS Version/Signing & capabilities
- For sync Change Project>Build Settings>Configurations>debug >> debug, release>>release, etc.
- Add to PodFile « target.build_configurations.each do |config| config.build_settings[‹ IPHONEOS_DEPLOYMENT_TARGET ›] = ’12’ end »
- close Xcode
- pod deintegrate in the ios folder
- pod install also in the ios folder
- flutter clean in the flutter project folder
- flutter pub get
- In release.xcconfig:
- #include « Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig »
- #include « Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig »
- flutter run or build in xCode.
Ça n’a pas fonctionné.
Les deux erreurs sont liées. Mais je tourne en rond.
[✓] Flutter (Channel stable, 3.13.6, on macOS 13.5.2 22G91 darwin-arm64, locale fr-FR)
• Flutter version 3.13.6 on channel stable at /opt/homebrew/Caskroom/flutter/3.3.10/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ead455963c (3 weeks ago), 2023-09-26 18:28:17 -0700
• Engine revision a794cf2681
• Dart version 3.1.3
• DevTools version 2.25.0
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/pierrecherbero/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/pierrou/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A240d
• CocoaPods version 1.13.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.83.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.74.0
[✓] Connected device (3 available)
• Pierrou (mobile) • ---------------------------- • ios • iOS 16.3.1 20D67
• macOS (desktop) • macos • darwin-arm64 • macOS 13.5.2 22G91 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.70
[✓] Network resources
• All expected network resources are available.
• No issues found!
Des idées pour m’aider please ? Un petit coup de main ne serait pas de trop…