gpt4 book ai didi

ios - +[FIRAnalytics setAnalyticsCollectionEnabled :]: unrecognized selector sent to class

转载 作者:行者123 更新时间:2023-11-29 13:53:24 27 4
gpt4 key购买 nike

我正在将 React Native 从 RN0.59.10 升级到 RN0.60.0(使用 Podfile)

从我的包管理器中,安装了 5.5.6 版"react-native-firebase": "^5.5.6",

这是我的 Podfile 中的内容pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'

Firebase frameworks I have in my project]([![Firebase frameworks I have in my project

====================

我成功构建了项目,但在运行时(应用启动时)遇到了以下问题

+[FIRAnalytics setAnalyticsCollectionEnabled:]: unrecognized selector sent to class 0x10377e400

以下是模拟器和物理设备上的尝试

  1. 尝试遵循 here 中的一些解决方案

  2. 在我项目的构建阶段下删除并重新附加 firebase 框架

    • FIRAnalyticsConnector.framework

应用程序在 RNFirebase.xcodeproj > analytics > RNFirebaseAnalytics.m > RCT_EXPORT_METHOD 中的以下方法处崩溃

RCT_EXPORT_METHOD(setAnalyticsCollectionEnabled:(BOOL) enabled) {
[FIRAnalytics setAnalyticsCollectionEnabled:enabled];
}

这是我从 xCode 获得的完整崩溃日志

2019-10-08 17:05:37.413335+0800 testApp[350:50876] +[FIRAnalytics setAnalyticsCollectionEnabled:]: unrecognized selector sent to class 0x10377e400
2019-10-08 17:05:37.430 [fatal][tid:com.facebook.react.RNFirebaseAnalyticsQueue] Exception '+[FIRAnalytics setAnalyticsCollectionEnabled:]: unrecognized selector sent to class 0x10377e400' was thrown while invoking setAnalyticsCollectionEnabled on target RNFirebaseAnalytics with params (
1
)
callstack: (
0 CoreFoundation 0x0000000225e18edc <redacted> + 252
1 libobjc.A.dylib 0x0000000224fe9a40 objc_exception_throw + 56
2 CoreFoundation 0x0000000225d36ccc <redacted> + 0
3 CoreFoundation 0x0000000225e1e7dc <redacted> + 1412
4 CoreFoundation 0x0000000225e2048c _CF_forwarding_prep_0 + 92
5 testApp 0x000000010313b418 -[RNFirebaseAnalytics setAnalyticsCollectionEnabled:] + 64
6 CoreFoundation 0x0000000225e20630 <redacted> + 144
7 CoreFoundation 0x0000000225cfe450 <redacted> + 292
8 CoreFoundation 0x0000000225cff034 <redacted> + 60
9 testApp 0x00000001031e9b6c -[RCTModuleMethod invokeWithBridge:module:arguments:] + 1896
10 testApp 0x00000001031ed568 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 660
11 testApp 0x00000001031ed0dc _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144
12 testApp 0x00000001031ed040 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
13 libdispatch.dylib 0x0000000104657824 _dispatch_call_block_and_release + 24
14 libdispatch.dylib 0x0000000104658dc8 _dispatch_client_callout + 16
15 libdispatch.dylib 0x0000000104660e6c _dispatch_lane_serial_drain + 720
16 libdispatch.dylib 0x0000000104661b60 _dispatch_lane_invoke + 460
17 libdispatch.dylib 0x000000010466bbfc _dispatch_workloop_worker_thread + 1220
18 libsystem_pthread.dylib 0x0000000225a350dc _pthread_wqthread + 312
19 libsystem_pthread.dylib 0x0000000225a37cec start_wqthread + 4
)
2019-10-08 17:05:37.431276+0800 testApp[350:50876] Exception '+[FIRAnalytics setAnalyticsCollectionEnabled:]: unrecognized selector sent to class 0x10377e400' was thrown while invoking setAnalyticsCollectionEnabled on target RNFirebaseAnalytics with params (
1
)
callstack: (
0 CoreFoundation 0x0000000225e18edc <redacted> + 252
1 libobjc.A.dylib 0x0000000224fe9a40 objc_exception_throw + 56
2 CoreFoundation 0x0000000225d36ccc <redacted> + 0
3 CoreFoundation 0x0000000225e1e7dc <redacted> + 1412
4 CoreFoundation 0x0000000225e2048c _CF_forwarding_prep_0 + 92
5 testApp 0x000000010313b418 -[RNFirebaseAnalytics setAnalyticsCollectionEnabled:] + 64
6 CoreFoundation 0x0000000225e20630 <redacted> + 144
7 CoreFoundation 0x0000000225cfe450 <redacted> + 292
8 CoreFoundation 0x0000000225cff034 <redacted> + 60
9 testApp 0x00000001031e9b6c -[RCTModuleMethod invokeWithBridge:module:arguments:] + 1896
10 testApp 0x00000001031ed568 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 660
11 testApp 0x00000001031ed0dc _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144
12 testApp 0x00000001031ed040 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28
13 libdispatch.dylib 0x0000000104657824 _dispatch_call_block_and_release + 24
14 libdispatch.dylib 0x0000000104658dc8 _dispatch_client_callout + 16
15 libdispatch.dylib 0x0000000104660e6c _dispatch_lane_serial_drain + 720
16 libdispatch.dylib 0x0000000104661b60 _dispatch_lane_invoke + 460
17 libdispatch.dylib 0x000000010466bbfc _dispatch_workloop_worker_thread + 1220
18 libsystem_pthread.dylib 0x0000000225a350dc _pthread_wqthread + 312
19 libsystem_pthread.dylib 0x0000000225a37cec start_wqthread + 4
)

我预计在发布期间不会出现任何崩溃问题。如果您在我的尝试/实现方式中发现任何问题,请分享。

谢谢。

最佳答案

设法解决了我自己的问题,请 read my github issue以查找更多详细信息。

TLDR;
事实证明我的项目包含一些旧的 Firebase 框架,这些框架附加在带有库的 Link Binary 中,因此版本来回变化(我想这是为什么我一直成功构建并时不时失败的最好解释)

关于ios - +[FIRAnalytics setAnalyticsCollectionEnabled :]: unrecognized selector sent to class,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58283563/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com