flutter与iOS混编(一)集成

2021-03-14  本文已影响0人  喜剧收尾_XWX

1.创建flutter_module

flutter create -t module flutter_module

2.iOS工程和flutter_module放在同一目录下

目录结构

3.打开flutter_module运行flutter pub get

4.配置原生cocoapod

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
flutter_application_path = "../flutter_module/"
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

inhibit_all_warnings!


target 'ObjcGo' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for ObjcGo

  #flutter
    install_all_flutter_pods(flutter_application_path)

  target 'ObjcGoTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'ObjcGoUITests' do
    # Pods for testing
  end

end

5.设置Bitcode

Bitcode
上一篇下一篇

猜你喜欢

热点阅读