简体   繁体   中英

Not able to run flutter application in simulator (iOS 15)

I have update flutter version from 1.x to 2.8.x and now I am trying to run application in Xcode 13.1 and Simulator iOS 15. I am facing this error. 'mobileffmpeg/LogDelegate.h' file not found and Command CompileSwiftSources failed with a nonzero exit code I tried some available solutions but it won't work for me.

I am using latest cocoa pod version 1.11.3

Error-Log (After performing flutter clean and flutter pub get and pod install in iOS)

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/username/Library/Developer/Xcode/DerivedData/Runner-ewlkrnytkuoiywhfslyuauileapw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/mobile-ffmpeg-https.build/Script-4C68ADEB2D24F6C2D2249598537085F9.sh: 
line 2: /Users/username/Documents/spieler_coach part 2/ios/Pods/Target Support Files/mobile-ffmpeg-https/mobile-ffmpeg-https-xcframeworks.sh: Permission denied
    Command PhaseScriptExecution failed with a nonzero exit code
    error: the following command failed with exit code 0 but produced no further output
CompileC /Users/username/Library/Developer/Xcode/DerivedData/Runner-ewlkrnytkuoiywhfslyuauileapw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/webview_flutter_wkwebview.build/Objects-normal/arm64/FlutterWebView.o /Users/username/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/FlutterWebView.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'webview_flutter_wkwebview' from project 'Pods')
    note: Building targets in dependency order
    warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
    warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.

When you upgrade your flutter version some libs can not work anymore. Have you know meaning of ^ yet? For example: you're using lib abc in version 5.10 like this abc: ^5.1.0 and abc has other version 5.2.0 , ... 5.9.0 and 6.0.0 . If you use ^ that means version range is from 5.1.0 to 5.9.0 . Maybe it has issue in ver 5.9.0. Moreover, sometimes the cause is not your library but its dependency. The abc lib uses xyz inside then it uses higher version that conflict with your flutter version.

  • So solution here is:
    • Try fix hard version of all libraries, remove using ^ : abc: 5.1.0
    • If problem comes from dependency of your lib such as xyz . Check your xyz ver from pubspec.lock then add more package xyz into pubspec.yaml with compatible version.

Update: You seems get issue with package https://pub.dev/packages/flutter_ffmpeg , please check Readme at section label:

2.1.2 iOS (Flutter >= 2.x) then replace two lines below:

def flutter_install_ios_plugin_pods(ios_application_path = nil)
↓
def flutter_install_plugin_pods(application_path = nil, relative_symlink_dir, platform)

plugin_pods = flutter_parse_plugins_file(plugins_file)
↓
plugin_pods = flutter_parse_plugins_file(plugins_file, platform)

Moreover, because the package was discontinued. You should change to https://pub.dev/packages/ffmpeg_kit_flutter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM