Xcode 10b5 - duplicate symbol linker error, can't compile with Crashlytics
Data Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.
Introduction
A duplicate symbol error means the linker found the same compiled symbol in more than one binary input. In Xcode 10 beta 5 this often showed up in projects that mixed older Crashlytics or Fabric integration methods with CocoaPods, manual framework linking, or stale build artifacts.
Why The Linker Fails
Compilation turns source files into object files. Linking is the later step that combines those objects and frameworks into the final app binary. If the same class, category, or function is present twice, the linker stops because it cannot choose one definition safely.
With Crashlytics-era projects, the common causes were straightforward:
- '
Fabric.frameworkorCrashlytics.frameworkwas linked manually and also installed through CocoaPods.' - Old static libraries stayed in
Link Binary With Librariesafter a migration. - '
DerivedDatastill contained object files built against a previous dependency layout.' - Two pods vendored overlapping binaries.
The error text usually mentions the exact symbol name and the two object paths that define it. That pair is the fastest way to find the duplication.
Inspect The Build Inputs
Start by confirming whether Crashlytics is present more than once.
If the build fails, inspect the offending symbol in the paths reported by the linker.
Related reading
- Xcode 11 backward compatibility UIWindowScene is only available in iOS 13 or newer
- Xcode 11 debugger is extremely slow - A known problem?
- Xcode 12.3 Building for iOS Simulator, but the linked and embedded framework was built for iOS iOS Simulator
- Xcode 12.4 “Unsupported OS version” after iPhone iOS update 14.7
- Xcode 13.3 beta 3 swift package init shows warning /Library/org.swift.swiftpm/collections.json has been deprecated but dunno how to use new one
- Xcode 14.3 build error unable to initiate PIF transfer session operation in progress?
- Xcode 14 deprecates bitcode - but why?
- Xcode 14 needs selected Development Team for Pod Bundles
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseNo course covers this one yet
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.