iOS-Flutter混合开发1-iOS引入Flutter

前置条件

已安装Flutter、cocoaPods

1.项目搭建

1.1文件目录

【建议】iOS项目与Flutter同级

1.2创建项目

1.3 Flutter Module搭建

2.Flutter Module混编到已有工程

创建Podfile文件,添加FlutterModel路径

platform :ios, '10.0'

flutter_application_path = '../flutter_module'

load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

target 'flutterDemo' do

install_all_flutter_pods(flutter_application_path)

end

其中flutter_application_path为FlutterModel的相对路径

执行 pod install 

你可能感兴趣的:(iOS-Flutter混合开发1-iOS引入Flutter)