南京江浦做网站设计的公司,网站的优化承诺,深圳58网站建设,WordPress文章相册修改报错图片
背景
flutter 开发的 apple app 需要发布新版本#xff0c;但是最后一哆嗦碰到个报错#xff0c;这个小问题卡住了我一天#xff0c;之间的埪就不说了#xff0c;直接说我是怎么解决的#xff0c;满满干货
思路
这个报错 涉及到 flutter_barcode_scanner; 所…报错图片
背景
flutter 开发的 apple app 需要发布新版本但是最后一哆嗦碰到个报错这个小问题卡住了我一天之间的埪就不说了直接说我是怎么解决的满满干货
思路
这个报错 涉及到 flutter_barcode_scanner; 所以一开始我一直在更改这个插件的版本上下手最终失败告终当我绝望之时发现这个flutter_barcode_scanner 插件官网的一句话 If your existing ios code is Objective-C then you need to do following. Create a new flutter project with same name at different location (Dont forget to check Include swift support for iOS code while creating)Just copy newly created /ios folder from project and replace with existing /ios.Open ios project in Xcode and set minimum deployment target to 12 and set Swift version to 5.Run pod install in /ios Note: If you did any changes in ios part before, you might need to make these configuration again 总的来说就是我用到的插件对应的苹果版本有所改变这里是要求最低 minimum deployment target 12 详细解决步骤
首先xcode 打开当前的 flutter 项目 ios 包的 Runner.xcworkspace 文件双击即可直接打开到 xcode 第一步直接看图 第二步 第三步
关于此插件的版本限制应该就解决完了但是还没结束更改完上述内容保存或者直接退出 xcode
第四步
随便打开一个你常用的编译器打开 flutter 完整项目
删除pubspec.lock文件依次执行
flutter clean flutter pub cache repairflutter pub get flutter build ios
第五步
等编译成功再次把项目从 xcode 打开运行 你会发现解决❗️