LoginSignup
7
5

More than 5 years have passed since last update.

UIView.addMotionEffect(_:) が main thread checker に引っかかる

Posted at

UIView.addMotionEffect(_:)
https://developer.apple.com/documentation/uikit/uiview/1622586-addmotioneffect

これが使われてると main thread checkerが警告を出してくる

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 1778, TID: 142950, Thread name: com.apple.CoreMotion.MotionThread, Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   libobjc.A.dylib                     0x00000001f8fc3894 <redacted> + 56
5   CoreMotion                          0x00000001ff840760 CoreMotion + 304992
6   CoreMotion                          0x00000001ff840c94 CoreMotion + 306324
...
略

iOS12からだと思われる

この辺の有名OSSでも使われているので困る…

main threadで実行させてるのにmain thread checkerに引っかかるので解決策は謎です…

7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5