请在Podfile中为此目标指定一个平台?

问题描述 投票:7回答:2

我想配置Firebase Firestore。我按照所有步骤,但最后一步我得到了错误链接,我提到。

执行此pod之后安装以下错误我得到了错误

[!]在目标ios上自动为版本11.4分配平台testing_gowtham,因为没有指定平台。请在Podfile中为此目标指定一个平台。见https://guides.cocoapods.org/syntax/podfile.html#platform

我的PodFile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'testing_gowtham' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!


  # Pods for testing_gowtham

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

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

    pod 'Firebase/Core'
    pod 'Firebase/Firestore'
end

我看到这个https://guides.cocoapods.org/syntax/podfile.html#platform,但我没有找到我需要改变哪一行。

如何解决这个问题?

ios swift firebase google-cloud-firestore
2个回答
17
投票

用下面的文本替换整个pod文件,然后检查。

# Uncomment the next line to define a global platform for your project

# platform :ios, '9.0'

target 'testing_gowtham' do

use_frameworks!


pod 'Firebase/Core'
pod 'Firebase/Firestore'
end

(或)解决方案2

platform :ios, '9.0'工作......我只是删除#this


1
投票
# Uncomment the next line to define a global platform for your project
 platform :ios, '9.0'

target 'testing_gowtham' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for testing_gowtham
 pod 'Firebase/Core'
 pod 'Firebase/Firestore'

end
© www.soinside.com 2019 - 2024. All rights reserved.