yandex / mapkit-ios-demo

MapKit iOS demo
Other
82 stars 26 forks source link

UI thread called from background on setApiKey #30

Closed illabo closed 1 year ago

illabo commented 5 years ago

Before returning from YMKMapKit.setApiKey(MAPKIT_API_KEY) there is a call to UI from background thread:

Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 342, TID: 13926, Thread name: 3#BgNorm(Global, Queue name: com.apple.root.default-qos.overcommit, QoS: 0

I believe it caused by calling [UIApplication applicationState] in yandex::maps::mapkit::lbs::lastKnownLocation's closure/block. But I'm not so handy with debugging precompiled pods, so could be wrong. Never got a crash, though it is thread safety violation anyway. Warning is consistent in simulator and on device. YandexMapKit pod v 3.3.

Снимок экрана 2019-03-18 в 21 17 19
thisisdingo commented 5 years ago

@illabo do you solve this problem?

illabo commented 5 years ago

@thisisdingo Yeah, sort of, switched on HERE maps. ¯\_(ツ)_/¯

thisisdingo commented 5 years ago

@illabo Окей, тоже наверное переключусь... @eberkovich Было бы супер если ты подключишься)

thisisdingo commented 5 years ago

Кому костыль тому сюда https://github.com/yandex/mapkit-ios-demo/issues/44