Firebase Undefined Symbols for x86_64 Architecture

I use firebase as part of a project that I am working on on iOS, and I just stumbled upon the following binding error when I try to compile my code using the iPhone 6 or 7 simulator for testing.

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GTMSessionUploadFetcher", referenced from:
      objc-class-ref in FirebaseStorage(FIRStorageUploadTask_d5061b1e2b5f1bb249816cc5fc42ff62.o)
  "_OBJC_CLASS_$_GTMLogger", referenced from:
      objc-class-ref in FirebaseMessaging(GIPReachability_ae5504e4a6a28a1d8997c6f38e8bff8b.o)
  "_kGTMSessionUploadFetcherStandardChunkSize", referenced from:
      -[FIRStorageUploadTask enqueue] in FirebaseStorage(FIRStorageUploadTask_d5061b1e2b5f1bb249816cc5fc42ff62.o)
  "_GTMFetcherStandardUserAgentString", referenced from:
      -[FIRAuthBackendRPCIssuerImplementation init] in FirebaseAuth(FIRAuthBackend_ea73237c278bd1b78e1c76db2a16775a.o)
  "_OBJC_CLASS_$_GTMSessionFetcher", referenced from:
      objc-class-ref in FirebaseStorage(FIRStorageDownloadTask_c390366e83519f6636ca985ecb70e5d0.o)
      objc-class-ref in FirebaseStorage(FIRStorage_691ea9ac7cb4d224d37df2ff8a911989.o)
  "_OBJC_CLASS_$_GTMSessionFetcherService", referenced from:
      objc-class-ref in FirebaseAuth(FIRAuthBackend_ea73237c278bd1b78e1c76db2a16775a.o)
      objc-class-ref in FirebaseStorage(FIRStorage_691ea9ac7cb4d224d37df2ff8a911989.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using Xcode 8.2.1, swift 3.0, and I also have the following Pod file in my project

pod 'Braintree'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'GeoFire', :git=>'https://github.com/firebase/geofire-objc.git'
pod 'ObjectMapper', '~> 2.2'

I did a module update in case something is out of date but no luck. The code compiles and works fine when I use the iPhone 4 or 5 simulator.

Edit:

I set Build Active architecture to No, in the allowed architectures I have listed arm64, armv7, armv7s, and now Objectmapper fails, although it is import ObjectMapperdeclared in the file

 Use of undeclared type 'Mappable'

Any help would be greatly appreciated! Thank you in advance.

George.

+13
7

, . Xcode, /Users/USER_NAME/Library/Developer/Xcode/PROJECT_NAME

Xcode, , Active Architecture Only - .

+4

Firebase Xcode, CocoaPods - . , , , x86_64. (, , Xcode VMWare)

:

libsqlite3.tbd, libz.tbd, lib++. tbd

.

+18

, Pod-Cache.

CocoaPods

pod deintegrate && pod cache --all

+14

, . SO GitHub. . Xcode 9.2, Swift 4, cocoa pods. ...

-, podfile firebase pod, Analytics , , .
pod 'Firebase/Core'

-, , , -ObjC . , . .

-, , Project, ,

-framework

"FirebaseCore"

-framework

"FirebaseAnalytics"

-framework

"FirebaseInstanceID"

-framework

"FirebaseNanoPB"

-framework

"FirebaseCoreDiagnostics"

-framework

"nanopb"

+2

, , FirebaseMessaging , Firebase SDK, ( Cocoapods Carthage). , "Protobuf.framework". Protobuf , , .

+2

...
$(inherited)

0

" Cocoapods" " ", . , Carthage ( Cocoapods)

$(OTHER_LDFLAGS) -ObjC " " "Build". ".

: https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md

: Cocoapods | SDK: FirebaseAnalytics (6.1.2) | IDE: Xcode 11.0 | macOS: Mojave 10.14.5 Beta | : Swift 4.2 | : iOS 11. 0+

0

Source: https://habr.com/ru/post/1670034/


All Articles