How to log a warning that shows up as a runtime issue in Xcode?

前端 未结 6 1428
粉色の甜心
粉色の甜心 2021-01-01 11:32

Xcode 8 or 9 started displaying runtime issues. You see a purple icon at the top of the window, and a list in Issue Navigator, next to buildtime issues like compilation warn

6条回答
  •  清歌不尽
    2021-01-01 11:58

    CocoaLumberjack framework can be used to capture Run times console logs as well as App's Background wakeup logs.

    https://github.com/CocoaLumberjack/CocoaLumberjack

    https://github.com/phonegap/phonegap-plugin-push/issues/1988

    This way you can capture purple warnings displayed in Xcode9 like below in a file that is maintained inside App Container:-

    =================================================================

    Main Thread Checker: UI API called on a background thread: -[UIApplication registerUserNotificationSettings:] PID: 2897, TID: 1262426, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 21

提交回复
热议问题