Mac M1 Flutter下IOS编译问题汇总

Showing Recent Messages
Runner has conflicting provisioning settings. Runner is automatically signed for development, but a conflicting code signing identity Apple Distribution has been manually specified. Set the code signing identity value to "Apple Development" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor.

ld: '/Users/timeloit/develop/flutter/.pub-cache/hosted/pub.flutter-io.cn/objectbox_flutter_libs-0.10.0/ios/Carthage/Build/iOS/ObjectBox.framework/ObjectBox' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/timeloit/develop/flutter/.pub-cache/hosted/pub.flutter-io.cn/objectbox_flutter_libs-0.10.0/ios/Carthage/Build/iOS/ObjectBox.framework/ObjectBox' for architecture arm64

bitcode = false

  1. ‘agora_rtc_engine' not found
    解决方式:
    IOS打开工程时要选择Runner.xcworkspace而不是Runner.xcodeproj

  2. remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
    解决方式:
    Build Settings -> Compilation Mode -> Switch to "Incremental"

  3. App Store Connect Operation Error
    unsatisfied requirement: com.apple.transporter.softwaresupport


    image.png

    这个总是是XCODE11以上不再支持使用applicationLoader进行上传
    解决方式:
    使用官方推荐的Transporter工具,从商店下载。
    或者:

// 1. terminal输入
open ~/Library/Caches/com.apple.amp.itmstransporter/
// 2. 删除com.apple.amp.itmstransporter 文件夹里面所有文件
// 3. 输入
/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/itms/bin/iTMSTransporter
// 4. 重启xcode

4.pod install时报如下错误:
/Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:36: [BUG] Illegal instruction at 0x0000000100e84000
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21
解决方案:
问题主要是由于MAC M1使用arm芯片架构,原先gem下载下来的cocoapods架构指令不支持,需要下载新的支持M1架构的cocoapods

// 1.卸载cocoapods
sudo gem uninstall cocoapods
// 2.执行下载新的cocoapods
brew install cocoapods
// 3.如果提示```zsh: command not found: brew```,下载brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
// 如果下载不下来,使用国内源进行下载
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
// 4.重新执行pod install

5.报 Unhandled exception:
Invalid argument(s): A directory corresponding to fileSystemPath "/Users/devin/.pub-cache/hosted/pub.flutter-io.cn/devtools-2.9.2/build" could not be found
原因:
最新的devtools-2.9.2有问题,没有build目录,把它替换成devtools-2.8.0
解决方式:
执行 dart pub global activate devtools -v 2.8.0

你可能感兴趣的:(Mac M1 Flutter下IOS编译问题汇总)