flutter iOS 问题点

#首次使用mac,flutter友盟推送测试。遇到的问题点总结。

#开发者账号

#证书问题,参考友盟文档https://developer.umeng.com/docs/67966/detail/66748

flutter create -i objc -a java umeng_push

cd /umeng_push/ios

pod init

#增加 并设置下FLUTTER_FRAMEWORK_DIR环境变量flutter/bin/cache/artifacts/engine/ios

#用于加载flutter第三方插件

if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
  abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
end
target 'Runner' do
  use_frameworks!
  # Pods for Runner
  # Flutter Pods
  pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
  if File.exists? '../.flutter-plugins'
    flutter_root = File.expand_path('..')
    File.foreach('../.flutter-plugins') { |line|
      plugin = line.split(pattern='=')
      if plugin.length == 2
        name = plugin[0].strip()
        path = plugin[1].strip()
        resolved_path = File.expand_path("#{path}/ios", flutter_root)
        pod name, :path => resolved_path
      else
        puts "Invalid plugin specification: #{line}"
      end
    }
  end
end
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

pod install

问题点:[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig` in your build configuration (`Flutter/Debug.xcconfig`).

解决:

文件夹flutter中的为flutter环境配置,配置上是为了避免/packages/flutter_tools/bin/xcode_backend.sh: No such file or directory的问题点,要不还得在build settings中单独的增加个user-defined FLUTTER_ROOT。 Pods下的配置文件就是识别pods下载的第三方库了。

 

其他问题点:Couldn’t communicate with a helper application.

解决:signing & capabilities 中的 automatically manager signing 不勾选,同时需要导入下provisioning file

#至此直接真机测试了

#友盟测试消息也可顺利收到 。

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值