Flutter之路(Android篇)https://www.jianshu.com/p/eef3730977a3
根据android篇配好Flutter sdk 并创建flutter 项目
IOS混合Flutter开发(Debug)
Podfile文件修改
这个是cocoapods 插件List页面,主要是在这个文件中增加flutter 插件
flutter_application_path = 'path/to/my_flutter/'
eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)
在Podfile文件目录下执行
pod install
关闭 Bitcode ,flutter暂时不支持Bitcode功能
Build Phases
首先在flutter项目选择IOS模拟器run
image.png
然后在IOS项目中选择 Build Phases选项卡
image.png
点击加号选择New Run Script Phase
然后选择Run Script 选项添加
"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build
"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" embed
image.png
现在flutter debug功能就加好了,比起android来说ios确实要更简单一些,如果对原理想要了解可以参照官方链接https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps#experiment-integrate-flutterviewcontroller
网友评论