Joseph Lau
Joseph Lau

Reputation: 253

Xcode: can't build, duplicate symbol - ld: 305 duplicate symbols for architecture arm64

I'm having trouble building my Xcode project to device and simulator. I'm receiving a bunch of duplicate symbol errors for CrashlyticsFramework and Fabric.framework.

Error looks something like this:

    duplicate symbol _OBJC_IVAR_$_CLSIcon._prerendered in:
    /Users/Abdi/Desktop/app-ios/Pods/CrashlyticsFramework/Crashlytics.framework/Crashlytics(CLSIcon.o)
    /Users/Abdi/Desktop/bento-ios/Fabric.framework/Fabric(CLSIcon.o)
duplicate symbol _OBJC_IVAR_$_CLSIcon._size in:
    /Users/Abdi/Desktop/app-ios/Pods/CrashlyticsFramework/Crashlytics.framework/Crashlytics(CLSIcon.o)
    /Users/Abdi/Desktop/app-ios/Fabric.framework/Fabric(CLSIcon.o)
duplicate symbol _OBJC_METACLASS_$_CLSIcon in:
    /Users/Abdi/Desktop/app-ios/Pods/CrashlyticsFramework/Crashlytics.framework/Crashlytics(CLSIcon.o)
    /Users/Abdi/Desktop/bento-ios/Fabric.framework/Fabric(CLSIcon.o)
ld: 305 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 18

Views: 5111

Answers (2)

webo80
webo80

Reputation: 3403

I just realized that Answers code is included in the 'Crashlytics' pod, so no need to add the 'Answers' pod. Was a little brainfuck to me. They should update their docs.

Upvotes: 70

David van Dugteren
David van Dugteren

Reputation: 4119

The suggestions in here solved the problem for our machines locally and on the CI server -> https://github.com/zergtmn/Fabric/issues/5

Specifically, insuring that the Fabric Mac app was installed and updating the podfile:

pod 'Fabric/Core', '~> 1.2'
pod 'Fabric/Crashlytics', '~> 1.2'

Then finally updating the Crashlytics run script from XCode:

./Pods/Fabric/Fabric.framework/run YOUR_API_KEY YOUR_API_SECRET

Upvotes: 1

Related Questions