Flutter

解决老iOS项目加入Flutter出现的一些问题

2019-11-28  本文已影响0人  sunnytu123
$ flutter create -t module xxx

flutter_application_path = '../flutter_module'
eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)


解决方法:

把podfile改成如下,之后运行pod install

platform :ios, '9.0'
use_frameworks!

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

    target 'flutter_ios_navative' do
    install_all_flutter_pods(flutter_application_path)
  

    end

WX20191128-151935.png
解决方法:

把对应framework的bitcode关掉


WX20191128-152224.png
解决方法:
你的flutter目录/flutter/packages/flutter_tools/bin/xcode_backend.sh

打开sh文件 编辑第144行

#RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -exec chmod a-w "{}" \;
#改成
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -iname '.h' -exec chmod a-w "{}" \;
上一篇下一篇

猜你喜欢

热点阅读