首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >快速GeoFire错误链接器错误_OBJC_CLASS_$_GeoFire

快速GeoFire错误链接器错误_OBJC_CLASS_$_GeoFire
EN

Stack Overflow用户
提问于 2017-11-16 16:40:51
回答 1查看 91关注 0票数 0

我可以编译和构建应用程序,直到我添加这2行地火代码,我得到链接器错误。

代码语言:javascript
复制
  let geofireRef = Database.database().reference().child("USER")


override func viewDidLoad() {
    super.viewDidLoad()


  let geoFire = GeoFire(firebaseRef: geofireRef)
}

我在这个错误中被困了几个小时了。仍然不确定什么和如何解决。这是我的Podfile

代码语言:javascript
复制
   # Uncomment the next line to define a global platform for your project
 platform :ios, '11.0'

target 'App' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  pod 'Firebase'
  pod 'FirebaseCore’
  pod 'FirebaseAuth'
  pod 'FirebaseStorage'
  pod 'FirebaseDatabase'
  pod 'Material'
  pod 'Kingfisher', '~> 4.0'
  pod 'MapKitGoogleStyler'
  pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git'
  pod 'Mapbox-iOS-SDK', '~> 3.6'
  pod 'MapboxDirections.swift', '~> 0.12'

  #Pods for App

  target 'AppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'AppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

这是我从XCode那里得到的错误

未定义的体系结构符号arm64:"_OBJC_CLASS_$_GeoFire",引用于: objc-class-ref,在第二代mainViewController.o:符号(S)中找不到架构arm64 clang: arm64: linker命令失败,退出代码1(使用-v查看调用)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-11-17 21:57:11

我不知道为什么,但我通过添加pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git', :branch => 'mpmcdonald-use-community'找到了答案,它运行得很好。

参考链接-来自Github

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47334945

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档