版别介绍
XCode版别: 14.3
Flutter版别: 3.10.0
Pod包办理器
Pod 是一个 IOS 的包办理东西,就像安卓有 gradle 办理包相同,了解 Flutter 中 IOS 打包东西有助于我们在打包进程中减少错误
Flutter IOS 的配置文件途径:项目根目录/ios/Podfile
一、将 Runner.xcodeproj 当成 Runner.xcworkspace
问题: 将Runner.xcodeproj当成Runner.xcworkspace直接在XCode中跑这样会报错
解决方法:把Runner.xcworkspace文件放到XCode中跑
以下文件都在ios目录中

二、打包主动分配版别导致打包错误
问题: Automatically assigning platform iOS
with version 8.0
on target Runner
because no platform was specified. Please specify a platform for this target in your Podfile.
解决方法:
翻开 Podfile 文件,将第一行的制定 IOS 版别翻开
# Uncomment this line to define a global platform for your project
platform :ios, '11.0' # 解开注释即可# Uncomment this line to define a global platform for your project

三、ios 构建进程遇到xxx包不存在
原因: pod拉包的时分没有把某个包给下载下来
问题: Could not build the application for the simulator. Error launching application on iPhone 14 Pro Max.
解决方法:
- 删除去 Podfile 文件,以及 Podfile.lock 文件。
- 在项目终端运转
flutter clean
- 在项目终端运转
flutter pub get
- 在 IOS 目录运转
pod install
- 在项目终端运转
flutter run -v
即可
四、打包报错:xxx for architecture arm64
问题: Building for iOS Simulator, but linking in object file built for iOS, file ‘/xxx/xxxx’ for architecture arm64
解决方法:
在 Flutter 项目中的 IOS 文件下翻开

结尾
继续总结中….
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。