已经安装flutter的情况下
1、到你flutter的路径下面
我自己的路径 cd ~/development
2、将flutter工具添加到您的路径
export PATH="$PATH:`pwd`/flutter/bin"
3、检查环境并向终端窗口显示报告flutter doctor
4、到你要创建的文件夹路径
我自己的 cd /Users/laoyanqiao/Desktop/dddd
5、创建flutter模块 flutter create --template module my_flutter
6、用VScode打开该模块运行查看是否正确
7、打开在同一文件夹下面用xcode创建好的项目。该项目安装cocopods
8、打开Podflie 设置如下
platform :ios, '10.0'
flutter_application_path = '../my_flutter'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target "appBlendDemo" do
install_all_flutter_pods(flutter_application_path)
end
target "appBlendDemoTests" do
这个是要下载的第三方库
pod 'MJRefresh'
pod 'Masonry'
pod 'AFNetworking'
end
终端pod install
9、下载完成后打开xcode项目xcworkspace
10、继承完成
网友评论