我有我的 iOS MyApp ,使用 Firebase,并且我必须集成一个基于 ARCore Geospatial 的“Unity 作为库”模块
我尝试了很多不同的策略来构建它,但无论我做什么,在运行时它都会记录很多 Firebase 冲突,然后崩溃,如下面的日志摘录所示
Unity框架单独运行时运行流畅
如果我从 MyApp 中删除 Firebase,一切也运行良好,(但当然我无法在生产版本中删除 Firebase)
周围还有人遇到同样的问题吗?
类似这样的错误很多
objc[8956]: Class FIRInstallationsErrorUtil is implemented in both /private/var/containers/Bundle/Application/EE0FB4F1-DFB7-4A15-8781-DE1336275BEA/Loquis.app/Frameworks/UnityFramework.framework/UnityFramework (0x10bcbd960) and /private/var/containers/Bundle/Application/EE0FB4F1-DFB7-4A15-8781-DE1336275BEA/Loquis.app/Loquis (0x101cd0c38). One of the two will be used. Which one is undefined. objc[8956]: Class FIRInstallationsHTTPError is implemented in both /private/var/containers/Bundle/Application/EE0FB4F1-DFB7-4A15-8781-DE1336275BEA/Loquis.app/Frameworks/UnityFramework.framework/UnityFramework (0x10bcbd988) and /private/var/containers/Bundle/Application/EE0FB4F1-DFB7-4A15-8781-DE1336275BEA/Loquis.app/Loquis (0x101cd0c60). One of the two will be used. Which one is undefined.
然后...
10.19.1 - [FirebaseCore][I-COR000003] The default Firebase app has not yet been configured. Add `FirebaseApp.configure()` to your application initialization. This can be done in in the App Delegate's application(_:didFinishLaunchingWithOptions:)` (or the `@main` struct's initializer in SwiftUI).
最后它崩溃了
** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x282f7ed30'
*** First throw call stack:
(0x198194870 0x1904b3c00 0x19822519c 0x1980d9ff8 0x19821ab10 0x1096bc7ec 0x1096bbf8c 0x1096596b4 0x1038e4f50 0x1038e6b34 0x1038eeba4 0x1038ef728 0x1038fc5f8 0x1038fbc2c 0x201b05964 0x201b05a04)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x282f7ed30'
*** First throw call stack:
(0x198194870 0x1904b3c00 0x19822519c 0x1980d9ff8 0x19821ab10 0x1096bc7ec 0x1096bbf8c 0x1096596b4 0x1038e4f50 0x1038e6b34 0x1038eeba4 0x1038ef728 0x1038fc5f8 0x1038fbc2c 0x201b05964 0x201b05a04)
[0x125f6c800] Created session
[0x0] Releasing session
[0x125f6c800] Releasing session
Uncaught exception: NSInvalidArgumentException: -[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x282f7ed30
(
0 CoreFoundation 0x000000019819487c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 968828
1 libobjc.A.dylib 0x00000001904b3c00 objc_exception_throw + 60
2 CoreFoundation 0x000000019822519c B37A1273-B0C2-312E-9E0B-7143FB645C69 + 1560988
3 CoreFoundation 0x00000001980d9ff8 B37A1273-B0C2-312E-9E0B-7143FB645C69 + 204792
4 CoreFoundation 0x000000019821ab10 _CF_forwarding_prep_0 + 96
5 UnityFramework 0x00000001096bc7ec -[GDTCCTUploadOperation updateNextUploadTimeWithResponse:forTarget:] + 52
6 UnityFramework 0x00000001096bbf8c __54-[GDTCCTUploadOperation uploadBatch:toTarget:storage:]_block_invoke + 56
7 UnityFramework 0x00000001096596b4 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.18 + 52
8 libdispatch.dylib 0x00000001038e4f50 _dispatch_call_block_and_release + 32
9 libdispatch.dylib 0x00000001038e6b34 _dispatch_client_callout + 20
10 libdispatch.dylib 0x00000001038eeba4 _dispatch_lane_serial_drain + 1368
11 libdispatch.dylib 0x00000001038ef728 _dispatch_lane_invoke + 408
12 libdispatch.dylib 0x00000001038fc5f8 _dispatch_root_queue_drain_deferred_wlh + 328
13 libdispatch.dylib 0x00000001038fbc2c _dispatch_workloop_worker_thread + 444
14 libsystem_pthread.dylib 0x0000000201b05964 _pthread_wqthread + 288
15 libsystem_pthread.dylib 0x0000000201b05a04 start_wqthread + 8
)
libc++abi: terminating due to uncaught exception of type NSException
objc[8956]: Class _TtGCs18_DictionaryStorageSSGV20FirebaseCoreInternal13WeakContainerCS0_16HeartbeatStorage__$ is implemented in both ?? (0x13b525b28) and /usr/lib/swift/libswiftCore.dylib (0x1e91273a0). One of the two will be used. Which one is undefined.
在尝试在应用中使用任何 Firebase 服务之前,请确保 Firebase 已初始化。 用于调试的有用链接 https://firebase.google.com/docs/unity/build-debug-guide https://medium.com/firebase-developers/debugging-firebase-functions-in-vs-code-a1caf22db0b2