【问题标题】:XCode 12 Preview Crashes when adding Firebase SDK Swift UI 2.0添加 Firebase SDK Swift UI 2.0 时 XCode 12 预览崩溃
【发布时间】:2021-01-14 00:19:53
【问题描述】:

自从上次 Xcode 更新到 12.0.1 后,SwiftUI 预览在添加到项目时崩溃。

崩溃日志提示问题出在firebase sdk中,更具体的是 GoogleDataTransport/GDTCORLibrary

    System Integrity Protection: enabled

Crashed Thread: 3 Dispatch queue: com.google.GDTCORFlatFileStorage

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSFileManager enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:]: URL is nil'
terminating with uncaught exception of type NSException

Firebase (6.33) 通过 cocoapods (1.10.0.rc.1) 与 Catalina 10.15.7 上的 Xcode 12.0.1

github 上有一个未解决的问题 有人找到了解决方案或解决方法吗?

【问题讨论】:

    标签: swift xcode firebase swiftui


    【解决方案1】:

    将 GoogleDataTransport 从 7.4.0 降级到 7.3.0 可以解决问题,但是如果您使用 Firebase 6.33.0,降级将不起作用,因为 GoogleDataTransport 7.4 版本已锁定在 Firebase Core podspec 中。根据 AppDelegate FirebaseApp.configure() 中的崩溃报告预览崩溃,因此如果在 DEBUG 中不需要 Firebase 功能,它可能会被宏排除:

    #if RELEASE
       FirebaseApp.configure()
    #endif
    

    【讨论】:

      【解决方案2】:

      将 GoogleDataTransport 从 7.4.0 降级到 7.3.0 可以解决此问题 => pod 'GoogleDataTransport', '7.3.0'

      【讨论】:

        猜你喜欢
        • 2022-08-09
        • 1970-01-01
        • 1970-01-01
        • 2019-03-28
        • 2021-01-13
        • 1970-01-01
        • 1970-01-01
        • 2019-11-02
        • 1970-01-01
        相关资源
        最近更新 更多