我可以编译和构建应用程序,直到我添加这2行地火代码,我得到链接器错误。
let geofireRef = Database.database().reference().child("USER")
override func viewDidLoad() {
super.viewDidLoad()
let geoFire = GeoFire(firebaseRef: geofireRef)
}我在这个错误中被困了几个小时了。仍然不确定什么和如何解决。这是我的Podfile
# 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查看调用)
发布于 2017-11-17 21:57:11
我不知道为什么,但我通过添加pod 'GeoFire', :git => 'https://github.com/firebase/geofire-objc.git', :branch => 'mpmcdonald-use-community'找到了答案,它运行得很好。
https://stackoverflow.com/questions/47334945
复制相似问题