Please specify a platform for this target in your Podfile?
Solution 1
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
Solution 2
# 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
Solution 3
There are Three ways to fix it
- BREAKING FEAT: forward port to firebase-ios-sdk v7.3.0.
Due to this SDK upgrade, iOS 10 is now the minimum supported version by FlutterFire. Please update your build target version.
Solution:
Go to the file
ios/Podfile
inside your project, and uncomment# platform :ios, '9.0'
Then change the version to 10
platform :ios, '10.0'
Go to the file
ios/Podfile
inside your project, find there the line# platform :ios, '9.0' // and uncomment it.
After uncommenting your Podfile will seems like this
# 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
After that delete
ios/Podfile.lock
file and runpod install
Follow these commands in the terminal to fix the issue :
gem uninstall cocoapods gem install cocoapods rm Podfile.lock pod setup pod install
If you have installed rvm
as the root user, then you must sudo
to install anything. like sudo gem uninstall cocoapods
Solution 4
In your Podfile -> Uncomment platform and set ios : 10.0
platform :ios, '10.0'
this will work.
Solution 5
If the above error occurs when you install pod 'PusherSwift'
and pod 'AlamofireImage'
you have to remove #
symbol from
# platform :ios, '9.0'.
Then write the command pod install in your terminal.
When you run the project again the error will appear according to 'pusher swift'
.you have to click unblock option. Then the problem is successfully solved.
Related videos on Youtube
![Gowthaman M](https://i.stack.imgur.com/VSpsJ.png?s=256&g=1)
Gowthaman M
honest Developer as well hardworker Android,IOS,Java,XML,Firebase,Firestore,HTML,Css,Java Script. Answering questions and helping others in Stack. Currently Working in TechMahindra in Bangalore
Updated on May 05, 2022Comments
-
Gowthaman M about 2 years
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 version11.4
on targettesting_gowtham
because no platform was specified. Please specify a platform for this target in your Podfile. Seehttps://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?
-
Sandeep almost 6 yearsSee the comment on the first line, it says uncomment second line in order to set the platform.
-
Gowthaman M almost 6 yearsI removed second line still same error sir
-
Paul Beusterien almost 6 yearsDon't remove it, uncomment it
-
Gowthaman M almost 6 years// # platform :ios, '9.0' i uncomment like this..but still same error sir
-
Paul Beusterien almost 6 yearsplatform :ios, '9.0'
-
Jiya over 3 yearsCange the " # platform :ios, '9.0' " To " platform :ios, '9.0' ". Just remove that "#"
-
-
Gowthaman M almost 6 yearsthanks for your quick response...just I need to remove this line # platform :ios, '9.0' I am right
-
aBilal17 almost 6 yearsNo,, let me change my answer
-
Gowthaman M almost 6 yearsThanks bro.. I removed that line same error....can you please give exact answer what should I change..
-
Gowthaman M almost 6 yearsThank you I will check please just a min
-
Gowthaman M almost 6 yearsaBilal17 what will the problem sir any another idea
-
aBilal17 almost 6 yearsBro i have removed another line from my answer. Can you please check it again? or send me your pod file on my email [email protected]
-
Gowthaman M almost 6 yearsplatform :ios, '9.0' is working bro...I have to remove
#
this -
ssowri1 over 5 yearsThank you so much!
-
Dhaval Gevariya about 4 yearsGreat kurupareshan .!! You saved my Time.
-
Vinny almost 3 yearsbecause it runs pod install again
-
Andre Pena about 2 yearsAfterwards, you have to go into the
ios
folder and runpod repo update
but yes. This does indeed works. Thanks