Firebase and Google Signin giving duplicate symbol

2020-07-03 04:40发布

问题:

duplicate symbol _kServiceInfoFileName in:
/Users/APPLE/Desktop/Justride/Pods/Firebase/Libraries/libFIRCore.a(GmpMeasurement.pb.o)
/Users/APPLE/Desktop/Justride/Pods/Google/Libraries/libGGLCore.a(GmpMeasurement.pb.o)

duplicate symbol _OBJC_CLASS_$_ACPResultData in:
/Users/APPLE/Desktop/Justride/Pods/Firebase/Libraries/libFIRCore.a(GmpMeasurement.pb.o)
/Users/APPLE/Desktop/Justride/Pods/Google/Libraries/libGGLCore.a(GmpMeasurement.pb.o)

duplicate symbol _OBJC_METACLASS_$_ACPResultData in:
/Users/APPLE/Desktop/Justride/Pods/Firebase/Libraries/libFIRCore.a(GmpMeasurement.pb.o)
/Users/APPLE/Desktop/Justride/Pods/Google/Libraries/libGGLCore.a(GmpMeasurement.pb.o)

ld: 46 duplicate symbols for architecture x86_64

回答1:

Appreciate this is an older question, but judging from the comment other people have hit the same thing. You should be able to use the two together, as long as you're using the most recent versions of both the Google and Firebase pods.

One of the things that might make that difficult is if you're referencing something that doesn't exist any more. For example, if you include pod 'Google\AppInvite' then CocoaPods will use an older version of the Google pod, as the AppInvite subspec no longer exists. In that case you need to update to pod 'Firebase\Invites'.

You can see a full list of what the updated dependencies should be in the iOS migration guide.

Finally, remember to run pod update to ensure you pull down the latest versions of the depedencies rather than just pod install.

If you're still having trouble, please post your Podfile, and check your Podfile.lock to see what version numbers of the Google and Firebase pods you have.