Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate symbols with pod 'Firebase/AnalyticsWithoutAdIdSupport' #2

Open
amaurydavid opened this issue May 5, 2021 · 1 comment
Open

Comments

@amaurydavid
Copy link

Summary

When using the pods Firebase/AnalyticsWithoutAdIdSupport and BatchFirebaseDispatcher, Xcode fails to build due to duplicate symbols.

Reproduction steps

  1. Have a podfile like:
pod 'Firebase/AnalyticsWithoutAdIdSupport', '~> 7.11.0'
pod 'Batch', '~> 1.17.1'
pod 'BatchFirebaseDispatcher', '~> 2.0.0'
  1. Run pod install.
  2. Try building your app.

Logs

(...)
duplicate symbol '_APMIncludeAPMScreenClassNameWindowCategory' in:
    path/to/DerivedData/myapp-hifbnfpmnmjptbeisshlcbknoxfs/Build/Products/Entreprise Debug Preprod-iphonesimulator/XCFrameworkIntermediates/GoogleAppMeasurement/GoogleAppMeasurement.framework/GoogleAppMeasurement(UIWindow+APMScreenClassName.o)
    path/to/DerivedData/myapp-hifbnfpmnmjptbeisshlcbknoxfs/Build/Products/Entreprise Debug Preprod-iphonesimulator/XCFrameworkIntermediates/GoogleAppMeasurementWithoutAdIdSupport/GoogleAppMeasurementWithoutAdIdSupport.framework/GoogleAppMeasurementWithoutAdIdSupport(UIWindow+APMScreenClassName.o)
ld: 527 duplicate symbols for architecture x86_64

Specifications

SDK Version

1.17.1

Installation method

Cocoapods 1.10.1

Relevant development tools versions

Xcode 12.5

Additional information

When using pod 'Firebase/Analytic'~> 7.11.0' the issue disappears.
It looks to be the same issue as this ticket on the Firebase's github.
Could you provide a way to support Firebase/AnalyticsWithoutAdIdSupport ? Something like a subspec ?

@abarisain
Copy link
Member

Hi! Thanks for the complete report.

So, Firebase decided to have multiple variants of their Pod, which breaks anything that depends on the standard Firebase library. This happens because Cocoapods has no idea that one pod can stand in for the other

I don't think Cocoapods has advanced dependency resolution control (like gradle does).

I guess our fix here would be to introduce two subspecs, one for each Firebase flavour, like you suggested.

In the meantime, you can download the .podspec, change the dependency and commit it into your project.
Then, reference it in your Podfile like this: pod 'BatchFirebaseDispatcher', :path => '<relative path to where you put the podspec'`

If you put your podspec in your repo's root, that would look like pod 'BatchFirebaseDispatcher', :path => './'

Please note that I haven't tested this workaround yet.

We will improve this in the next release, but I have no timeframe for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants