Search code examples
iosswiftfirebasegoogle-cloud-firestorepodfile

Please specify a platform for this target in your Podfile?


I want to config Firebase Firestore. I followed all the steps, but at the last step, I got the error link below I mention.

After Executing this pod install command below error I got

[!] Automatically assigning platform ios with version 11.4 on target testing_gowtham because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.

My 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

I saw this https://guides.cocoapods.org/syntax/podfile.html#platform but I did not find which line I need to change .

How to solve this issue?


Solution

  • Replace your whole pod file text with below text and then check.

    # 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
    

    (or) solution 2

    platform :ios, '9.0' is working...I simply removed # this