1.进入Swift项目跟路径
cd 项目根路径
2.创建Flutter模块
flutter create --template module 模块名称
3.修改iOS应用程序中 Podfile 文件,如果没有则手动创建,内容如下:
flutter_application_path = '../my_flutter'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'My App' do
install_all_flutter_pods(flutter_application_path)
end
4.安装
pod install