我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()
我使用此代码转到新故事板,并将变量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”