Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter Can';添加firebase_消息后,无法为iOS构建_Flutter_Firebase Cloud Messaging - Fatal编程技术网

Flutter Can';添加firebase_消息后,无法为iOS构建

Flutter Can';添加firebase_消息后,无法为iOS构建,flutter,firebase-cloud-messaging,Flutter,Firebase Cloud Messaging,错误 颤振医生-v [✓] 颤振(通道稳定,1.22.5,在Mac OS X 10.15.7 19H524上 darwin-x64,地点(南非) [✓] Android工具链-为Android设备开发(Android SDK 版本30.0.2) [✓] Xcode-为iOS和macOS开发(Xcode 12.4) [✓] Android Studio(4.0版) [✓] 已连接的设备(1个可用) publispec.ymal environment: sdk: ">=2.7

错误

颤振医生-v

[✓] 颤振(通道稳定,1.22.5,在Mac OS X 10.15.7 19H524上 darwin-x64,地点(南非)

[✓] Android工具链-为Android设备开发(Android SDK 版本30.0.2)

[✓] Xcode-为iOS和macOS开发(Xcode 12.4)

[✓] Android Studio(4.0版)

[✓] 已连接的设备(1个可用)

publispec.ymal

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^0.1.3
  flutter_local_notifications: ^4.0.0
  badges: ^1.1.6
  rflutter_alert: ^1.1.0
  toggle_switch: ^0.1.8
  flutter_rating_bar: ^3.2.0+1
  firebase_messaging: ^6.0.16
Analyzing dependencies
firebase_core: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
Downloading dependencies
Installing Firebase (6.33.0)
Installing FirebaseAnalytics (6.8.3)
Installing FirebaseCore (6.10.3)
Installing FirebaseCoreDiagnostics (1.7.0)
Installing FirebaseInstallations (1.7.0)
Installing FirebaseInstanceID (4.8.0)
Installing FirebaseMessaging (4.7.1)
吊舱安装

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^0.1.3
  flutter_local_notifications: ^4.0.0
  badges: ^1.1.6
  rflutter_alert: ^1.1.0
  toggle_switch: ^0.1.8
  flutter_rating_bar: ^3.2.0+1
  firebase_messaging: ^6.0.16
Analyzing dependencies
firebase_core: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
Downloading dependencies
Installing Firebase (6.33.0)
Installing FirebaseAnalytics (6.8.3)
Installing FirebaseCore (6.10.3)
Installing FirebaseCoreDiagnostics (1.7.0)
Installing FirebaseInstallations (1.7.0)
Installing FirebaseInstanceID (4.8.0)
Installing FirebaseMessaging (4.7.1)
• iPhone 12 Pro Max (mobile) 
• C5C673A3-40FA-497B-9FC5-08D68C859FCA 
• iOS
• com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^0.1.3
  flutter_local_notifications: ^4.0.0
  badges: ^1.1.6
  rflutter_alert: ^1.1.0
  toggle_switch: ^0.1.8
  flutter_rating_bar: ^3.2.0+1
  firebase_messaging: ^6.0.16
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup


target 'Runner' do
  pod 'Firebase/Analytics'
  pod 'Firebase/Messaging'
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
    post_install do |installer|
      installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
        target.build_configurations.each do |config|
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
        end
      end
    end
Analyzing dependencies
firebase_core: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '6.33.0' defined in 'firebase_core'
Downloading dependencies
Installing Firebase (6.33.0)
Installing FirebaseAnalytics (6.8.3)
Installing FirebaseCore (6.10.3)
Installing FirebaseCoreDiagnostics (1.7.0)
Installing FirebaseInstallations (1.7.0)
Installing FirebaseInstanceID (4.8.0)
Installing FirebaseMessaging (4.7.1)