Flutter应用提交AppStore构建问题解决

上篇文已经成功将flutter运行在了iOS设备上,要提交AppStore,需要在Xcode中编译构建archive文件,而构建之前,需要使用终端在项目目录下执行 flutter build ios 命令后再构建archive文件,这时候可能会遇到2个问题(GeneratedPluginRegistrant Module ‘connectivity’ not found和error: The linked framework ‘Pods_Runner.framework’ is missing one or more
architectures required by this target: armv7. (in target ‘Runner’ from project
‘Runner’),如需要详细看到flutter build 等命令执行log,可以加-v参数,即 flutter -v build ios.

继续阅读

macOS上搭建Flutter环境并编译到iOS

需要测试一个基于Flutter编写的项目,于是走上了搭建Flutter环境之旅,虽然不难,但是首次搭建还是挺繁琐的.因为某些原因,我们访问Flutter会有些网络麻烦,可以把Flutter的镜像更新为中国开发者专用的,打开终端输入如下命令:

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

去官网下载一份Flutter最新的SDK包:https://flutter.dev/docs/development/tools/sdk/releases#macos

解压到一个固定目录,比如 ~/development 下,注:~代表当前登录用户文件夹.解压后完整目录如 ~/development/flutter.

继续阅读