ios - Swift 和 Firebase 项目在模拟器上运行在实际设备上出现错误

标签 ios swift firebase cocoapods firebase-realtime-database

我正在使用 Firebase SDK 开发一个 iOS 应用程序,该应用程序在模拟器上完美运行,但是当我尝试在实际设备上运行它时,我收到如下错误 enter image description here

当我尝试存档它时也是如此。我忘了说我是用cocoapods来安装Firebase SDK的。谢谢!

最佳答案

我遇到这个错误是因为 xcode 版本。 我已经使用 xcode beta 版本创建了该项目,然后我更新了它并收到了此错误。

几个小时后,当我放弃尝试解决此错误时,在尝试安装另一个 pod 时,发生了此错误:

/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:118:in git_version': Failed to extract git version fromgit --version("xcrun: error: active developer path (\"/Applications/Xcode-beta.app/Contents/Developer\") does not exist\nUsesudo xcode-select --switch path/to/Xcode.appto specify the Xcode that you wish to use for command line developer tools, or usexcode-select --installto install the standalone command line developer tools.\nSeeman xcode-select` for more details.\n") (RuntimeError) ...

当尝试运行

pod-install command

然后我运行了 sudo

xcode-select command --switch path / to / Xcode.app

提示错误,Firebase相关错误奇迹般地修复了。希望它可以帮助某人。

关于ios - Swift 和 Firebase 项目在模拟器上运行在实际设备上出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38496193/

相关文章:

ios - 在 Swift 中设置 NSManagedObject 关系

ios - cocoapods 的重复定义,即使它们不是

ios - 如何在 Swift 中捕获 "Index out of range"?

javascript - 使用内联编辑器的 Firebase 部署错误

java - Firebase 返回 null 而不是数据

ios - CocoaPods 和 Swift - 值得信赖吗?

ios - CALayer 的 backgroundFilters 在 UIView 上没有任何作用

ios - Swift 通过 UITabBarController 访问 viewController 的函数

swift - 在闭包中使用隐式数组值

javascript - snap.data 不是 onUpdate 中的函数