flutter导入swift项目中

    1. 报错:[!] InvalidPodfilefile: No such file or directory @ rb_sysopen - ./flutter_yyframework/.ios/Flutter/podhelper.rb.
      这是路径不对导致,需要采用绝对路径,别用相对路径(#注意路径和文件夹名字正确无误 最后有一个反斜杠)

ps:可以写相对路径;https://www.jianshu.com/p/1c0488291abb?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' # 最低适配iOS 12.0, 这里设置第三方适配最低版本,避免部分警告出现
config.build_settings['SWIFT_VERSION'] = '5.0'
flutter_post_install(installer) if defined?(flutter_post_install)
end
把podhelper.rb里的注释掉就好了

要放在podhelper.rb文件里
installer.pods_project.targets.each do |target|
target.build_configurations.each do |build_configuration|
# flutter_additional_ios_build_settings is in Flutter root podhelper.rb
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
flutter_additional_ios_build_settings(target)
end

  1. flutter_export_environment.sh文件不存在
    http://events.jianshu.io/p/84272990cb2b

参考连接:https://www.imgeek.org/article/825355199
参考连接:https://www.jianshu.com/p/a6f3b1b95548
github: https://github.com/flutter/flutter/issues/84279
https://github.com/flutter/flutter/issues/48038

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容