firebase-ios-sdk: Error satisfying GoogleUtilities/MethodSwizzler dependency.

  • Xcode version: 10.0 (10A255)
  • Firebase SDK version: 5.8.0
  • Firebase Component: Auth, Core, Database, Functions, Messaging, Performance, Storage
  • Component version: 5.8.0

Steps to reproduce:

  1. Create a new Xcode project
  2. pod init
  3. Add the following lines in the Podfile
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Functions'
pod 'Firebase/Messaging'
pod 'Firebase/Performance'
pod 'Firebase/Storage'

Note: Changing the platform to platform :ios, '12.0' causes the same issue.

  1. pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Performance":
  In Podfile:
    Firebase/Performance

Specs satisfying the `Firebase/Performance` dependency were found, but they required a higher minimum deployment target.
CocoaPods could not find compatible versions for pod "GoogleUtilities/MethodSwizzler":
  In Podfile:
    Firebase/Performance was resolved to 5.8.0, which depends on
      FirebasePerformance (= 2.1.1) was resolved to 2.1.1, which depends on
        GoogleUtilities/MethodSwizzler (~> 5.2.0)

Specs satisfying the `GoogleUtilities/MethodSwizzler (~> 5.2.0)` dependency were found, but they required a higher minimum deployment target.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 35 (10 by maintainers)

Commits related to this issue

Most upvoted comments

This looks like a CocoaPods bug with version resolution.

A workaround is adding pod 'GoogleUtilities', '5.2.3' to the Podfile.

We’ll continue to investigate. Thanks for the detailed report @zgosalvez

For the various Unity SDK users on this thread, we just released the 5.3.1 SDK with the fix for this issue. https://firebase.google.com/support/release-notes/unity

Fixed in Firebase 5.8.1

Hi everyone,

We’re working on patching the Firebase C++ and Unity releases to migrate them to the 5.9.0 iOS SDK. In the meantime, under Assets/Firebase/Editor/ there are a set of files matching *Dependencies.xml files (e.g AnalyticsDependencies.xml) that reference the iOS SDK version. You’ll need to modify the <iosPods> section of each file to reference iOS SDK 5.9.0 rather than 5.6.0. For example, in AnalyticsDependencies.xml change…

<iosPods>
    <iosPod name="Firebase/Analytics" version="5.6.0" minTargetSdk="8.0">
    </iosPod>
  </iosPods>

to…

<iosPods>
    <iosPod name="Firebase/Analytics" version="5.9.0" minTargetSdk="8.0">
    </iosPod>
  </iosPods>

@phuong-unity @ozbra I solved it by adding <iosPod name="GoogleUtilities/MethodSwizzler" version="5.2.0"> inside Firebase/Editor/AppDependencies.xml next to the Firebase/Core entry.

I’ll follow up with the Unity SDK team today on updating to at least the iOS Firebase SDK 5.8.1.

@ozbra You can see more about the link failure on the Xcode Report Navigator pane.

Also please do any follow up on one of the Firebase Unity support channels. See #1906.

Thank you for all those answers and guidance.

Thank you for redirection but the problem is Unity Firebase Unity support channels are not responding to anything. Similar question asked like 15 days but not a single proper answer yet. That is why I wanted to post here.

Hi @RobertBateman, I had this exact issue yesterday.

The fix for me was to add the iosPod GoogleUtilities/MethodSwizzler xml line to AppDependancies.xml (per @hex’s suggestion) but do NOT change the version number(s) in *Dependancies.xml from 5.6.0 to 5.9.0 – just leave them as-is or you’ll get the FDLURLComponents file not found error, not sure what fix is for that.

Hi @MiketoString ,

yeah that fixed it.

Thank you kindly 😃

A recent pod repo update or regeneration of the Podfile.lock file will expose the bug.

Analyzing dependencies [!] FirebaseAuth requires CocoaPods version >= 1.4.0, which is not satisified by your current version, 1.1.1.

@ozbra you just need to update your CocoaPods version. in terminal enter this command: gem install cocoapods

@jayahariv Thanks for the update. I’ll delete your comments here to keep this thread focused on original topic.

@paulb777, I can confirm that the workaround works. Thanks.

No problem; It’s the least I could do. Please keep us posted.