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

Created on 19 Sep 2018  ·  35Comments  ·  Source: firebase/firebase-ios-sdk

  • 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.

Most helpful comment

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

All 35 comments

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
In Podfile:
Firebase/Core

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

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

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

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

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

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

A better workaround is pod 'GoogleUtilities', '5.2.3' to get some build time fixes. I'll also edit above.

Meanwhile, we're working on doing a Firebase 5.8.1 patch to eliminate the need for the workaround.

Fixed in Firebase 5.8.1

@paulb777 do you know if this issue is also presented in the Unity SDK and if it is, has it been fixed?

@paulb777 do you know if this issue is also presented in the Unity SDK and if it is, has it been fixed?

I am having the same issue. Even empty project just with Firebase Auth and database plugin-ins added to project doesn't get a proper build. Spend almost a day to figure it out which also support cloud build but I am empty handed :/

I tried to build the Firebase dynamic_links sample app in Unity using Firebase 5.3 SDK and got this error:

pod install output:

Analyzing dependencies
[!] Unable to satisfy the following requirements:

  • GoogleUtilities/MethodSwizzler (~> 5.2.0) required by FirebaseAnalytics (5.1.1)

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

I tried to build the Firebase dynamic_links sample app in Unity using Firebase 5.3 SDK and got this error:

pod install output:

Analyzing dependencies
[!] Unable to satisfy the following requirements:

  • GoogleUtilities/MethodSwizzler (~> 5.2.0) required by FirebaseAnalytics (5.1.1)

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

It seems where every Firebase needs Core, this error is throwing. The sad part is I was able to get a working build without any problem 5 days ago but now I can't.

@paulb777 do you know if this issue is also presented in the Unity SDK and if it is, has it been fixed?

@paulb777 Do you have any idea about that?Because I have same problem in unity?

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

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

@paulb777 do you know of any workaround for this issue?

@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.

Another workaround that seems to work is supporting iOS 11.0 and higher in your project and in the podfile. Obviously not possible from many apps but if you're updating anyways to support 11.0+, you can get by.

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>

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>

Thank for information, although I still get an error. This time it is different. It seems FirebaseAuth gives an error.

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

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

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

Thank you. That worked.

@stewartmiles @paulb777 - thanks for the update. Looking forward to the fix in the new version.

@hex thanks for the workaround!

Hi! I have the same issue

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

But it started failing today in one CI machine, the others still install the dependencies fine. I'm using the Unity Plugin 5.2.1.

I'll add the AppDelegateSwizzler 5.2.3 in the xxDependencies.xml to make this work, but would love to know why this started failing from one day to another.

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

Hi guys, I've had the same issue here.

Using Unity 2018.1.0f2, Firebase Dynamic Links v5.3.0 and the Unity Cloud Build service.

Initially I got this message:
Specs satisfying the GoogleUtilities/AppDelegateSwizzler (~> 5.2.0) dependency were found, but they required a higher minimum deployment target.

I added this to the AppDependancies.xml:
\
\

And updated this line in AppDependancies.xml and DynamicLinksDependances.xml:
\

...based on the advice listed above, which has now removed that error message.

However I am now getting a different error in the Unity Cloud Build:
21365: ▸ ❌; /BUILD_PATH/xxx.xxx.xxx/temp.XXXXXX20181001-2937-155m1yy/Pods/FirebaseDynamicLinks/Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m:19:9: 'DynamicLinks/FDLURLComponents/FDLURLComponents+Private.h' file not found

I can't find anything useful by googling and I can't figure out what's missing. Do you think this error is related? There isn't much to configure in Unity and I've checked there are no missing files by re-downloading Firebase v5.3.0 so I'm not sure what to try next. Any suggestions are welcome.

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 :)

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

hi @stewartmiles, after importing v5.3.1 of the Unity SDK, I am now seeing the following build error on iOS:

285: ▸ Compiling FIRErrors.m
286: ❌;  /BUILD_PATH/unity/temp.XXXXXX20181003-3096-1bbqo71/Pods/FirebaseDynamicLinks/Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m:19:9: 'DynamicLinks/FDLURLComponents/FDLURLComponents+Private.h' file not found

screen shot 2018-10-03 at 4 45 25 pm

Hi @stewartmiles, I built a clean version from the 5.3.1 version and there is a compilation problem in Xcode. There is no much information about the error, just that code.

I can't find the 5.3.1 version. The 5.3.0 still have this issue.

Hi @paulb777 and @stewartmiles I've just downloaded 5.3.1 from the secret link and now I'm getting the same error...

/FirebaseDynamicLinks/Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m:19:9: 'DynamicLinks/FDLURLComponents/FDLURLComponents+Private.h' file not found

Update: Looks like this happens in Unity Cloud Build, but works fine locally on the machine.

In the cloud build log I see a lot of new "skipping" messages including:
24291: [Unity] Skipping adding source file Headers/Private/FirebaseDynamicLinks/FDLURLComponents+Private.h to Xcode project due to it is not part of the pod project

This didn't happen in previous (successful) builds with firebase 5.2.0.

I am sorry to revive this post again but starting from today build errors started to occur.

I am having @forgedk error. If you solve this, can you guide me?

Here is my problem. I was using Firebase SDK 5.3.0 with manual modification which showing here and it was working until 2 days ago. Which is where I got a working build. Today, when I tried to get build I am getting this error.
ekran resmi 2018-10-19 17 06 35

I have upgraded Firebase SDK to 5.3.1 and tried also but the result is the same. I even went further and created an empty project just with Firebase Auth and Database sdk included version of 5.3.1 and it gave the same problem. Is there a way around? Why this happens?

What I am using are
Xcode version: 10
Firebase SDK version: 5.3.1
Firebase Component: Auth and Database
Unity: 2017.4.1f1
Gem version: 1.5.3

@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.

@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.

In the cloud build log I see a lot of new "skipping" messages including:
24291: [Unity] Skipping adding source file Headers/Private/FirebaseDynamicLinks/FDLURLComponents+Private.h to Xcode project due to it is not part of the pod project

This didn't happen in previous (successful) builds with firebase 5.2.0.

Seeing this same issue on Unity Cloud Build building for iOS. I was on 5.4.4 and upgraded just now to 5.5.0 and have the issue in both versions. Has anyone solved this on UCB?

Was this page helpful?
0 / 5 - 0 ratings