How do I import the new logging functions in iOS 10 / Sierra / Xcode 8?

前端 未结 1 1441
无人共我
无人共我 2021-02-05 04:25

There is a new logging system in iOS 10 and macOS Sierra.

But I can\'t seem to make it work in Xcode. os_log is not recognized, and neither is any other func

相关标签:
1条回答
  • 2021-02-05 04:49

    In Swift:

    import os
    
    os_log("Some message")
    

    In Objective-C:

    #import <os/log.h>
    
    os_log(OS_LOG_DEFAULT, "Some message");
    
    0 讨论(0)
提交回复
热议问题