【问题标题】:Simulator Crash on Yandex app metrica configurationYandex 应用程序 metrica 配置上的模拟器崩溃
【发布时间】:2019-12-30 15:36:53
【问题描述】:

嘿,我有一个关于 yandex 配置的特殊问题。如果我在模拟器上运行应用程序,应用程序崩溃并出现以下错误:
'NSInvalidArgumentException',原因:'*** -[NSFileManager contentsOfDirectoryAtURL:包括PropertiesForKeys:选项:错误:]: 网址为零' 我在应用程序委托中的 applicationDidFinishLaunnchinWithOptions 中创建了一个环境条件,绕过了模拟器上的 yandex 配置:

#if !targetEnvironment(simulator)
    let configuration = YMMYandexMetricaConfiguration.init(apiKey: YANDEX_API_KEY)
    configuration?.crashReporting = true
    YMMYandexMetrica.activate(with: configuration!)
#endif


应用使用 yandex 不会崩溃,但模拟器会崩溃。

【问题讨论】:

    标签: swift xcode yandex yandex-metrika


    【解决方案1】:

    我遇到了同样的问题。 DerivedData 的路径不能有空格。

    检查您是否更改了用户文件夹的名称或 DerivedData 的路径。

    更改用户文件夹的名称对我有帮助。

    【讨论】:

      猜你喜欢
      • 2023-03-12
      • 2011-03-20
      • 2015-09-28
      • 2014-04-02
      • 2016-10-12
      • 1970-01-01
      • 1970-01-01
      • 2015-11-14
      • 2011-12-26
      相关资源
      最近更新 更多