title: build error trying to add Firebase to iOS app, "Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FIRApp""
body: <p>I am trying to add Firebase analytic support to an existing iOS app.
  The app was already using CocoaPods to import FMDB, and also has a manual build dependency on TensorFlow C library.</p>
  <p>After adding Firebase to my podfile file my build failed with,
  &quot;Module 'Firebase' not found&quot;</p>
  <p>Podfile</p>
  <pre><code>target 'myapp' do
    pod 'FMDB'
    pod 'Firebase/Analytics'
    
  end
  </code></pre>
  <p>Header Search Paths</p>
  <pre><code>$(TENSORFLOW_ROOT) $(TENSORFLOW_ROOT)/tensorflow/contrib/makefile/downloads $(TENSORFLOW_ROOT)/tensorflow/contrib/makefile/downloads/eigen $(TENSORFLOW_ROOT)/tensorflow/contrib/makefile/downloads/protobuf/src $(TENSORFLOW_ROOT)/tensorflow/contrib/makefile/gen/proto $(TENSORFLOW_ROOT)/tensorflow/contrib/makefile/downloads/nsync/public/ $(TENSORFLOW_ROOT)/tensorflow/contrib/makefile/downloads/absl ${PODS_ROOT}/Headers/Public/**
  </code></pre>
  <p>Framework Search Paths</p>
  <pre><code>&quot;${PODS_ROOT}/FirebaseAnalytics/Frameworks&quot; &quot;${PODS_ROOT}/GoogleAppMeasurement/Frameworks&quot; &quot;${PODS_XCFRAMEWORKS_BUILD_DIR}/FirebaseAnalytics&quot; &quot;${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAppMeasurement&quot;
  </code></pre>
  <p>Library Search Paths</p>
  <pre><code>&quot;${PODS_ROOT}/FirebaseAnalytics/Frameworks&quot; &quot;${PODS_ROOT}/GoogleAppMeasurement/Frameworks&quot; &quot;${PODS_XCFRAMEWORKS_BUILD_DIR}/FirebaseAnalytics&quot; &quot;${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAppMeasurement&quot;
  </code></pre>
  <p>Other Linker Paths</p>
  <pre><code>&quot;${PODS_ROOT}/FirebaseAnalytics/Frameworks&quot; &quot;${PODS_ROOT}/GoogleAppMeasurement/Frameworks&quot; &quot;${PODS_XCFRAMEWORKS_BUILD_DIR}/FirebaseAnalytics&quot; &quot;${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleAppMeasurement&quot;
  </code></pre>
  <h1>Attempt 2</h1>
  <p>This seems to be fixed by adding $(inherited) to the &quot;Header Search Paths&quot; and &quot;Framework Search Paths&quot;, as if these paths are customized they don't seem to pick up the pods without this. Although FMDB was working fine without this.
  But this still failed with a later build error,</p>
  <pre><code>Undefined symbols for architecture x86_64:
    &quot;_OBJC_CLASS_$_FIRApp&quot;, referenced from:
        objc-class-ref in AppDelegate.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1
  </code></pre>
  <p>If I remove the reference to FIRApp in my code, it builds fine.</p>
  <h1>Attempt 3</h1>
  <p>Build settings</p>
  <p>Add $(inherited) to &quot;Other Linker Flags&quot;
  This gives a build error on FMDB now,</p>
  <pre><code>ld: library not found for -lFMDB
  </code></pre>
  <h1>Attempt 4</h1>
  <p>Build settings</p>
  <p>Add $(inherited) to &quot;Library Search Paths&quot;
  This gives a different build error in FMDB</p>
  <pre><code>duplicate symbol '_OBJC_IVAR_$_FMResultSet._parentDB' in:
      /Users/paphus/Library/Developer/Xcode/DerivedData/Miami-btsjnxdkshhzzmcximegwcbjweif/Build/Intermediates.noindex/Miami.build/Debug-iphonesimulator/Miami.build/Objects-normal/x86_64/FMResultSet-8b2ff65f24dc1207099e1a3d8676b2cd074aac777d9679e86442f90b5f7cd476.o
      /Users/paphus/Library/Developer/Xcode/DerivedData/Miami-btsjnxdkshhzzmcximegwcbjweif/Build/Products/Debug-iphonesimulator/FMDB/libFMDB.a(FMResultSet.o)
  ld: 49 duplicate symbols for architecture x86_64
  </code></pre>
  <h1>Attempt 5</h1>
  <p>Build Phase</p>
  <p>Link Binary with Library,
  Seems to be missing FirebaseCore now?</p>
  <pre><code>ld: library not found for -lFirebaseCore
  </code></pre>
  <p>I also tried &quot;pod deintegrate&quot; and pod cache clean&quot; and a few other things, no luck.</p>