Firebase体系结构x86_64的未定义符号 [英] Firebase Undefined symbols for architecture x86_64

查看:73
本文介绍了Firebase体系结构x86_64的未定义符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Firebase用作我在iOS中正在处理的项目的一部分,当我尝试针对iPhone 6或7模拟器编译代码以进行测试时,我偶然发现了以下链接错误.

I am using firebase as part of a project I am working on in iOS, and I just stumbled upon the following linking error when I try to compile my code against an 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)

我正在使用Xcode 8.2.1,swift 3.0,并且我的项目中还有以下Pod文件

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'

我已经完成了pod更新,以防万一有些过时了,但是没有运气.当我使用iPhone 4或5模拟器时,代码可以编译并正常运行.

I have done a pod update in case something was out of date, but no luck. The code compiles and runs fine when I use an iPhone 4 or 5 simulator.

我已将Build Active架构设置为No,在有效的架构中,我列出了arm64,armv7,armv7s,现在即使文件中声明了import ObjectMapper,Objectmapper也失败了

I have set Build Active architectures to No, in valid architectures I have listed arm64, armv7, armv7s and now Objectmapper is failing even though import ObjectMapper is declared in the file

 Use of undeclared type 'Mappable'

任何帮助将不胜感激!预先谢谢你.

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

乔治.

推荐答案

似乎派生数据有问题.我退出了Xcode,删除了/Users/USER_NAME/Library/Developer/Xcode/PROJECT_NAME

It seems to be a glitch with derived data. I quitted out of Xcode, I removed all Derived Data in /Users/USER_NAME/Library/Developer/Xcode/PROJECT_NAME

重新启动Xcode,进行编译,所有操作均按预期进行,无需更改Active Architecture Only中的任何内容.

Restarted Xcode, compiled and all works as expected, no need to change anything in Active Architecture Only or anything.

这篇关于Firebase体系结构x86_64的未定义符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆