Specs satisfying the `Firebase/Functions` dependency were found, but they required a higher minimum deployment target
Asked Answered
B

11

52

I was trying to install pod 'Firebase/Functions' but failed with the following error:

`[!] CocoaPods could not find compatible versions for pod "Firebase/Functions": In Podfile: Firebase/Functions

Specs satisfying the Firebase/Functions dependency were found, but they required a higher minimum deployment target.`

Here is my pod file

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

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

 # Pods for MyApp

 pod 'Firebase/Core'
 pod 'Firebase/Firestore'
 pod 'Firebase/Database'
 pod 'Firebase/Auth'
 pod 'Firebase/Messaging' ,'~> 4.6.0'
 pod 'Firebase/Storage'
 pod 'Firebase/Functions'
 pod 'GoogleMaps'
 pod 'FirebaseUI/Auth'
 pod 'FirebaseUI/Phone'
 pod 'ImageSlideshow', '~> 1.6'
 pod 'DZNEmptyDataSet'
 pod 'SDWebImage'
 pod 'SDWebImage/WebP'

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

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

end

I have searched for some resources and let me do 3 steps:

pod repo update
pod update
pod install

I have done with those 3 steps with still not work.

Baikal answered 9/6, 2019 at 17:35 Comment(0)
R
9

Remove the '~> 4.6.0'.

FirebaseFunctions was introduced after Firebase 4.6.0 and is thus incompatible with the version restriction pod 'Firebase/Messaging' ,'~> 4.6.0'.

Reinertson answered 17/6, 2019 at 0:8 Comment(0)
M
74

If this solution didn't work for you (It didn't work for me haha), I found another option - here is the initial error I got:

[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
  In snapshot (Podfile.lock):
    Firebase/Firestore (= 6.34.0, ~> 6.0)

  In Podfile:
    Firebase/Firestore

    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 1.0.6, which depends on
      Firebase/Firestore (= 7.3.0)

Specs satisfying the `Firebase/Firestore, Firebase/Firestore (= 6.34.0, ~> 6.0), Firebase/Firestore (= 7.3.0)` dependency were found, but they required a higher minimum deployment target.

My Solution was to switch my ios/Podile's first line to platform :ios, '10.0' and run:

pod update
pod install

Pod Update updates Cocoa Pods, and for me it also installed the packages

Date: 4/21/21

Marrakech answered 21/4, 2021 at 18:41 Comment(3)
pod update worked for me in my Flutter project. Thanks!!!Renner
pod update worked for me in a React Native project react-native-cli: 2.0.1 react-native: 0.68.2Travesty
pod repo update && pod update && pod install; did it for me (Flutter project)Morman
O
24

I simply hat to run pod update in the ios folder of my flutter project

Osmic answered 12/7, 2022 at 11:50 Comment(0)
R
9

Remove the '~> 4.6.0'.

FirebaseFunctions was introduced after Firebase 4.6.0 and is thus incompatible with the version restriction pod 'Firebase/Messaging' ,'~> 4.6.0'.

Reinertson answered 17/6, 2019 at 0:8 Comment(0)
S
6

You need to increase your deployment target. Go to Project Navigator (Cmd + 1), select the your app's target and increase the iOS Deployment Target to the minimum required by Firebase (iOS >= 8). Finally, rerun pod install:

pod install
Slosberg answered 9/6, 2019 at 17:43 Comment(5)
My deployment target is version 11.0 why it is still not working?Baikal
I increased it to 11 and it worked for me with Flutter 2.Headlock
@Headlock I ran into this after a fresh install of the firebase_core and bumping it to the deployment target to 11.0 also worked for me 👍🏽Locomotor
@Locomotor I looked into the source of firebase and 10 would actually be enough.Headlock
@VisalSambo 10.0 worked for me with firebase_core: ^1.13.1 and firebase_messaging: ^11.2.8. No need to restrict it to higher version, since you loose potential compatible devices / iOS versions.Nahshun
S
4

As mentioned in the error you need to require a higher minimum deployment target.

Go to your Podfile and uncomment

#platform :ios, '9.0'

Then change the version to 10

platform :ios, '10.0'

Run the build again. Answer was taken from here

Stray answered 16/8, 2022 at 1:5 Comment(0)
D
4

Delete Podfile.lock file and then pod repo update then try to install pod

Dynode answered 5/4, 2023 at 6:20 Comment(0)
H
3

change pod 'Firebase/Messaging' ,'~> 4.6.0' to pod 'Firebase/Messaging'

And run pod install

Hasten answered 10/2, 2020 at 5:51 Comment(0)
S
2

As @Brady mentioned you need to update your podfile #platform line.

Mine also has this post install function at the bottom that needs to be updated as well, and seems to override even the target deployment set in Xcode.

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'] = '13.0'
    end
  end
end
Some answered 31/1, 2023 at 21:27 Comment(0)
M
1

run

pod install

and then according to your package name

pod update PACKAGE_NAME

Example:

pod update Firebase/Functions
Mantellone answered 28/11, 2023 at 3:28 Comment(0)
I
0

The error message is clear:

Specs satisfying the Firebase/Functions dependency were found, but they required a higher minimum deployment target.`

So I solved it by increasing the minimum deployment target on the podfile just like the error message stated.

To do that, open your podfile, uncomment this line: # platform :ios, '11.0' and increase it to a higher version, in my case 12, then try installing your functions again.

Thank you, and I hope this helps others who might encounter such in future.

Inoue answered 3/5 at 7:59 Comment(0)
F
0

I used GoogleMLKit in my project and it used to have below:

platform :ios, '15.5'  # or newer version


$iOSVersion = '12.0'  # or newer version

See here: GoogleMLKit Translation

Farber answered 10/7 at 6:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.