Firebase initWithUrl 在 iOS 5.1 上崩溃

Firebase initWithUrl crashes on iOS 5.1

我正在开发一个 Firebase 应用程序,用于我的旧 iPad 第一代 (iOS 5.1.1)。它在模拟器和其他设备上运行良好,但是,当我将它加载到 iPad 上进行测试时,我收到了这样的崩溃:

#0  0x33860f86 in objc_msgSend ()
#1  0x33862f94 in objc_retain ()
#2  0x000d26a0 in -[FRepoManager setQueue:] at /Users/mtse/Dev/firebase/firebase-client-objc/Firebase/Firebase/Core/FRepoManager.m:24
#3  0x33fdc5aa in dispatch_once_f$VARIANT$up ()
#4  0x000d1a80 in _dispatch_once [inlined] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk/usr/include/dispatch/once.h:68
#5  0x000d1a70 in +[FRepoManager singleton] at /Users/mtse/Dev/firebase/firebase-client-objc/Firebase/Firebase/Core/FRepoManager.m:37
#6  0x000e6736 in -[Firebase initWithUrl:] at /Users/mtse/Dev/firebase/firebase-client-objc/Firebase/Firebase/Firebase.m:54
#7  0x000c6f82 in -[AppDelegate application:didFinishLaunchingWithOptions:] at /xxx/AppDelegate.m:25
#8  0x3337acaa in -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] ()
#9  0x333747dc in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] ()
#10 0x33342ac2 in -[UIApplication handleEvent:withNewEvent:] ()
#11 0x33342566 in -[UIApplication sendEvent:] ()
#12 0x33341f3a in _UIApplicationHandleEvent ()
#13 0x3393422a in PurpleEventCallback ()
#14 0x35c16522 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#15 0x35c164c4 in __CFRunLoopDoSource1 ()
#16 0x35c15312 in __CFRunLoopRun ()
#17 0x35b984a4 in CFRunLoopRunSpecific ()
#18 0x35b9836c in CFRunLoopRunInMode ()
#19 0x3337386a in -[UIApplication _run] ()
#20 0x33370cd4 in UIApplicationMain ()
#21 0x000c778c in main at /xxx/main.m:14

一旦代码到达这一行就会发生这种情况:

    Firebase *ref = [[Firebase alloc] initWithUrl:kFirebaseURL];

我什至尝试将 Firebase 框架降级到旧版本,但问题仍然存在。我也设置了 -ObjC 链接器标志。关于如何解决这个问题的任何想法?

抱歉,Firebase SDK 不再支持 iOS 5.x。你可以试试SDK的old versions看看能不能用,但我不知道。

您可以通过将框架降级到 v1.0.8 来解决这个问题(直接 link 到 ZIP 文件)——这是最新版本,在 iPad 1 与 iOS 5.1.1.