https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps#ios
Flutter是一款移动应用程序SDK,一份代码可以同时生成iOS和Android两个高性能、高保真的应用程序。
Flutter目标是使开发人员能够交付在不同平台上都感觉自然流畅的高性能应用程序。
目前使用Flutter的APP并不算很多,相关资料并不丰富,介绍现有工程引入Flutter的相关文章也比较少。
sudo git clone -b beta https://github.com/flutter/flutter.git $HOME/flutter
open ~/.bash_profile
在底部添加环境变量。source ~/.bash_profile
open ~/.zshrc
,底部添加如下:flutter doctor
命令,如下图:没有安装 Android Studio。 Android Studio 配置有问题。 Android Studio 没有安装Flutter插件。 没有安装Xcode,或Xcode版本过低。 没有安装CocoaPods 没有安装 libimobiledevice 没有安装 ideviceinstaller 没有安装 ios-deploy
安装或修改需要的地方,直到 flutter doctor 没有错误提示为止。
Flutter.xcconfig
、Debug.xcconfig
、Release.xcconfig
三个配置文件。Flutter.xcconfig
是指向外目录flutter module的Generated.xcconfig
文件路径引用文件,其他两个代表Xcode的环境配置文件。
open $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh
flutter_assets
并不能使用 Create groups
的方式添加,只能使用 Creat folder references
的方式添加进Xcode项目内,否则跳转flutter会页面渲染失败(页面空白)。需要先删除引用。四、改造iOS工程