Simulator Crash on Yandex app metrica configuration

384 views Asked by At

Hey I have this peculiar issue regarding yandex configuration. If I run the app on simulator app crashes with following error:
'NSInvalidArgumentException', reason: '*** -[NSFileManager contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:]: URL is nil' I have created an environment condition in my applicationDidFinishLaunnchinWithOptions in app delegate that bypasses yandex configuration on simulator:

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


app uses yandex and doesn't crash but simulator crashes.

1

There are 1 answers

0
Sergey Spitsin On BEST ANSWER

I had the same problem. The path to DerivedData must not have whitespaces.

Check if you changed the name of the user folder or the path to the DerivedData.

Changing the name of the user folder helped me.