Tag: 火力

体系结构x86_64的未定义符号:适用于Xcode 8.3.2中的Firebase

我手动安装了firebase到我的Xcode的存储数据的目的。 我遵循从DOCS的README和集成。 但是,这个问题是,一切安装后,我得到以下编译器错误。 Undefined symbols for architecture x86_64: “_kFIRAppDiagnosticsErrorKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsSDKNameKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsSDKVersionKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsFIRAppKey”, referenced from: +[FIRDiagnostics logDiagnostics:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRServiceAuthUI”, referenced from: +[FIRDiagnostics populateLogProtoWithInstalledServices:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) +[FIRDiagnostics mapFromServiceStringToTypeEnum:] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_kFIRAppDiagnosticsNotification”, referenced from: +[FIRDiagnostics load] in FirebaseCoreDiagnostics(FIRDiagnostics_0c03a82afb19aa444c2f4902b5217b60.o) “_FIRAuthStateDidChangeInternalNotificationAppKey”, […]

如何在返回variables之前等待firebase将数据加载到variables中然后调用函数

这个问题不是重复的。 所以我有一个简单的函数,它将获取tableview单元格被点击的索引的参数,所以函数将进入didSelectRowAt tableView函数,它也将返回一个string。 该函数被称为getOpposingUserName,它连接到firebase以收集数据库内提供的信息。 现在我知道函数的function起作用了,这是一种逻辑错误,我不太明白。 从我所知道的是,无论何时您尝试从Firebase获取数据,它都会运行该代码,并花费一秒时间来实际获取数据。 但是因为它这样做,它会继续运行下面的代码,试图从数据库中获取数据。 这意味着如果我想返回一个string,那么string将永远是零或无论我设置其初始值,因为数据库将花费很长的时间来加载和函数已经跑过代码返回的东西。我对它的理解,我敢肯定有更多的技术方式来解释它) 所以基本上我问的是如何将数据“加载”到variables中,然后检查firebase是否已经将某些东西加载到variables中,然后将该variables返回给函数 这个问题不是重复的我已经阅读了这个问题,试图在我自己的实现中理解它。 当我阅读代码时,我不会返回一个代码让我感到困惑的函数。 这里是我的代码的function func getOpposingUsername(_ index: Int) -> String { var opposingUser: String = "" //the self.tieBetToUser just gets the randomized id from the bet in firebase don't need to worry about it self.datRef.child("Bets").child(self.tieBetToUser[index]).observe(.childAdded, with: { snapshot in guard let dict = snapshot.value as? [String: AnyHashable] […]

我在哪里上传Firebase Consol中的APNS / p12证书文件?

你好我在iOS有一个应用程序。 该应用程序包含许多目标基于不同的plist信息在过去的GCM消息应用程序中的时间,我有3个目标,现在我移动到firebase所以我将项目firebase from GCM console迁移到firebase from GCM console ,现在我有2个新的客户端,目标在我的项目(与firebase),所以我创build新的APNS certificates及其.p12但是当从firebase请求的GoogleService-Info.plist文件,它只是简单地给我不要求.p12文件现在我整合了我的项目中的所有东西,但不要在后台得到推送通知 得到下面的日志: 我没有findselect上传APNS / .p12文件在火力点上或者是没有必要,那么为什么我不能在后台得到通知

GoogleToolboxForMac.framework和GoogleOpenSource.framework冲突

我已经在我的应用中使用GoogleOpenSource.framework进行Google+整合。 现在我想添加Firebase Analytics和Google跟踪代码pipe理器。 为了做到这一点,它需要包括GoogleToolboxForMac.framework。 现在我包含GoogleToolboxForMac和GoogleOpenSource框架。 问题是两个框架都有GTMLogger类,所以项目无法编译。 它给 duplicate symbol _OBJC_METACLASS_$_GTMLogAllowedLevelFilter 我尝试从框架中删除GTMLogger类,但不能完成。 我该怎么办才能解决这个问题呢?

如何创build一个函数,最终返回一些数据,调用者必须等待

这实际上是一个Swift语言types的问题 我正在使用Firebase读取/写入数据 我想devise一个快速返回的例程, 最终返回。 调用者必须等待例程完成,所以它不是一个asynchronous的后台调用。 理想情况下,主叫方也应该能够: 确定成功或错误返回,并处理返回值 如果调用函数耗时太长,则等待超时 在这个function里面,hold-up只是Firebase的一个事件。 例如: func eventuallyReturnFirebase() { //some stuff someObj.observeEventType(.ChildAdded, withBlock: { snapshot in print("\(snapshot.key) -> \(snapshot.value)") if (snapshot.key == "foo") { // we found value for foo } if (snapshot.key == "bar") { // we found value for bar } }) //now we can return foo and bar […]

确保Firebase中的asynchronous操作已完成

我需要在swift中对Firebase执行并发查询。 在我的应用程序中允许启动另一个动作之前,如何确保循环查询已完成? 例如,第一个查询是一个简单的,简单地拉数据。 但第二个遍历一个数组,在我的firebase数据库中查找某个节点,遍历数组self.contacts : // First check if friend, and remove/add to friendsURL.observeSingleEventOfType(.Value, withBlock: { snapshot in for oneSnapshot in snapshot.children { for oneContact in contactsArray { for oneContactPhoneNum in oneContact.phoneNumbers { let phoneNumber = oneContactPhoneNum.value as! CNPhoneNumber contactNumber = phoneNumber.stringValue // Clean the number let stringArray = contactNumber!.componentsSeparatedByCharactersInSet( NSCharacterSet.decimalDigitCharacterSet().invertedSet) let newString = "1" […]

iOS上的Firebase参考

我是在iOS上使用Firebase的新手。 我有多个需要访问Firebase ref对象的视图控制器。 我可以为每个视图控制器创build一个新的参考实例吗? Firebase内部是否只保留1个参考? 另一种方法是创build一个Firebase实例作为成员的单例类,然后在每个VC中重用。

为什么removeAllObservers()不能在deinit中工作?

众所周知,在iOS中使用Firebase的迷人风格时, 每当你在视图控制器中进行观察, var o: DatabaseReference? var o2: DatabaseReference? var o3: DatabaseReference? 当屏幕消失时,必须终止所有的观测。 private func clearObservations() { print("\n\n clearing observations! \n\n") if o != nil { o?.removeAllObservers() o = nil } if o2 != nil { etc… } 然而! 经过相当多的testing之后,您不能在deinit调用clearObservations() ,您必须在viewDidDisappear (或其他某个逻辑位置)中调用它。 再次 – 它明确地不起作用 。 我的问题,为什么实际上这不起作用呢? 顺便说一下,您启动了一个Firebase观察器,如下所示: say, viewWillAppear# o = Database.database().reference(withPath: "string") o!.observe(.value, with: […]

无法使用最新的Firebase框架读取/写入Nest Firebase的值

我一直试图将嵌套整合到我的iOS应用程序中,遵循关于用户authentication的所有说明,然后调用嵌套API。 我使用Nest的iOS示例应用程序作为参考: https://github.com/nestlabs/iOS-NestDK 我确认他们的项目正在工作。 下面是一些代码,来自他们的项目,我修改了看看是否有什么设置“数据”。 self.rootFirebase = [[Firebase alloc] initWithUrl:@"https://developer-api.nest.com/"]; [self.rootFirebase authWithCredential:[[NestAuthManager sharedManager] accessToken] withCompletionBlock:^(NSError *error, id data) { if (error) { NSLog(@"Auth Failed! %@", error); } else { NSLog(@"Auth succeeded! %@", data); } withCancelBlock:^(NSError *error) {}]; 在我的代码中使用与最新的Firebase框架相同的确切函数authWithCredential,不会出现任何错误,并获得数据响应。 但是,在我的代码中进行调用,例如: Firebase * newFirebase = [self.rootFirebase childByAppendingPath:@“devices”]; [newFirebase observeEventType:FEventTypeChildAdded withBlock:^(FDataSnapshot *snapshot) { NSLog(@"Got devices: %@", snapshot.value); }]; […]

与iOS上的FlutterFire和原生GeoFire插件冲突

当我尝试将GeoFire添加到包含FlutterFire数据库插件的iOS Flutter项目时,出现错误。 这是错误的样子: Resolving dependencies of `Podfile` [!] Unable to satisfy the following requirements: – `Firebase (~> 2.1)` required by `GeoFire (1.1.0)` Specs satisfying the `Firebase (~> 2.1)` dependency were found, but they required a higher minimum deployment target. 我的podspec文件看起来像这样的atm: # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name […]