小编sal*_*eri的帖子

Swift Firebase“_OBJC_CLASS_$_GPBDescriptor”错误

firebase手动导入

运行时出现以下错误:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GPBDescriptor", referenced from:
      objc-class-ref in FirebaseMessaging(GtalkCore.pbobjc.o)
      objc-class-ref in FirebaseMessaging(GtalkExtensions.pbobjc.o)
  "_OBJC_CLASS_$_GPBCodedOutputStream", referenced from:
      objc-class-ref in FirebaseMessaging(FIRMessagingSecureSocket.o)
  "_OBJC_CLASS_$_GPBFileDescriptor", referenced from:
      objc-class-ref in FirebaseMessaging(GtalkCore.pbobjc.o)
      objc-class-ref in FirebaseMessaging(GtalkExtensions.pbobjc.o)
  "_OBJC_CLASS_$_FIRInstanceID", referenced from:
      objc-class-ref in FirebaseMessaging(FIRMessaging.o)
  "_OBJC_METACLASS_$_GPBMessage", referenced from:
      _OBJC_METACLASS_$_GtalkHeartbeatPing in FirebaseMessaging(GtalkCore.pbobjc.o)
Run Code Online (Sandbox Code Playgroud)

... clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

另外,我添加了libz,libsqlite3,libc++libcucore

AppDelegate我添加FirebaseApp.configure()

push-notification firebase swift

4
推荐指数
1
解决办法
569
查看次数

如何在新的故事板上将数据传递到ViewController

我使用此代码转到新故事板,并将变量X传递到新故事板中的viewController

let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let homeViewController: UIViewController = mainStoryboard.instantiateViewController(withIdentifier: "ViewControllerCall")
homeViewController.myVar = "x"
self.present(homeViewController, animated: true, completion: nil)
Run Code Online (Sandbox Code Playgroud)

但是我得到这个错误:

类型“ UIViewController”的值没有成员“ myVar”

xcode uiviewcontroller uistoryboard swift

1
推荐指数
1
解决办法
2203
查看次数