我正在使用Firebase的应用程序上工作。该应用程序是使用React-Native JS编写的。
问题是:首次启动应用程序时,尝试配置Firebase时崩溃。 当我在崩溃后关闭该应用并重新启动(无需卸载时,只需重新启动它),它就可以正常运行。
有人可以帮忙吗?这是错误日志:
anotheruser/events
这是我在2018-08-02 16:40:29.345 CVJM[6670] <Warning> [Firebase/Analytics][I-ACS005000] The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at ...
2018-08-02 16:40:29.348 CVJM[6670] <Notice> [Firebase/Analytics][I-ACS023007] Firebase Analytics v.4000000 started
2018-08-02 16:40:29.348 CVJM[6670] <Notice> [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ...)
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 6670, TID: 499999, Thread name: (none), Queue name: FIRAnalyticsQueue, QoS: 9
Backtrace:
4 CVJM 0x0000000102d8feb7 __38+[FIRAnalytics createAppDelegateProxy]_block_invoke + 55
5 libdispatch.dylib 0x000000010a3777ec _dispatch_client_callout + 8
6 libdispatch.dylib 0x000000010a378d64 dispatch_once_f + 285
7 CVJM 0x0000000102d8e366 __47+[FIRAnalytics startWithConfiguration:options:]_block_invoke_2 + 101
8 libdispatch.dylib 0x000000010a3767ab _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x000000010a3777ec _dispatch_client_callout + 8
10 libdispatch.dylib 0x000000010a37fbe5 _dispatch_queue_serial_drain + 1305
11 libdispatch.dylib 0x000000010a3804fa _dispatch_queue_invoke + 328
12 libdispatch.dylib 0x000000010a38336c _dispatch_root_queue_drain + 664
13 libdispatch.dylib 0x000000010a383076 _dispatch_worker_thread3 + 132
14 libsystem_pthread.dylib 0x000000010a8a2169 _pthread_wqthread + 1387
15 libsystem_pthread.dylib 0x000000010a8a1be9 start_wqthread + 13
2018-08-02 16:40:29.797 CVJM[6670] <Notice> [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2018-08-02 16:40:29.870 CVJM[6670] <Notice> [Firebase/Analytics][I-ACS003007] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 6670, TID: 499990, Thread name: (none), Queue name: com.google.fira.worker, QoS: 9
Backtrace:
4 CVJM 0x0000000102d8dd76 FIRAIsAppActive + 55
5 CVJM 0x0000000102d8d274 -[FIRASessionReporter shouldStartNewSession] + 19
6 CVJM 0x0000000102d8ce4e -[FIRASessionReporter initWithPersistedConfig:] + 282
7 CVJM 0x0000000102d77691 __48-[FIRAMeasurement startMeasurementOnWorkerQueue]_block_invoke + 1934
8 libdispatch.dylib 0x000000010a3777ec _dispatch_client_callout + 8
9 libdispatch.dylib 0x000000010a378d64 dispatch_once_f + 285
10 CVJM 0x0000000102d76f01 -[FIRAMeasurement startMeasurementOnWorkerQueue] + 286
11 CVJM 0x0000000102d76cc9 -[FIRAMeasurement setEnabledOnWorkerQueue:] + 117
12 CVJM 0x0000000102d8caea __52-[FIRAScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 32
13 libdispatch.dylib 0x000000010a3767ab _dispatch_call_block_and_release + 12
14 libdispatch.dylib 0x000000010a3777ec _dispatch_client_callout + 8
15 libdispatch.dylib 0x000000010a37fbe5 _dispatch_queue_serial_drain + 1305
16 libdispatch.dylib 0x000000010a3804fa _dispatch_queue_invoke + 328
17 libdispatch.dylib 0x000000010a38336c _dispatch_root_queue_drain + 664
18 libdispatch.dylib 0x000000010a383076 _dispatch_worker_thread3 + 132
19 libsystem_pthread.dylib 0x000000010a8a2169 _pthread_wqthread + 1387
20 libsystem_pthread.dylib 0x000000010a8a1be9 start_wqthread + 13
2018-08-02 16:40:30.802 CVJM[6670] <Warning> [Firebase/Analytics][I-ACS032003] iAd framework is not linked. Search Ad Attribution Reporter is disabled.
2018-08-02 16:40:30.805 CVJM[6670] <Notice> [Firebase/Analytics][I-ACS023012] Firebase Analytics enabled
libc++abi.dylib: terminating with uncaught exception of type NSException
AppDelegate.m
答案 0 :(得分:1)
我找到了解决方法。
这是我以前的podfile:
# Pods for MyApp
pod 'Firebase/Core', '4.0.0'
pod 'Firebase/Messaging'
在删除'4.0.0'
并运行pod update
之后,它将Firebase更新为5.x.x
。
不是很好吗?
答案 1 :(得分:0)
打开Xcode并打开
AppDelagate.m
导入这个
#import
例如
#import <Firebase.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
//rest codes
}