os_log compile time (build time) errors

If I use ANY of the new os_log APIs that were debuted with iOS 10 / Xcode 8 / macOS 10.12, I run into a compile time error


Implicit declaration of function 'os_log' is invalid in C99


I'm using Xcode 8, and my machine is running the latest version of macOS (non-beta), developing for iOS 10.1


Any idea what gives?

Replies

You need to include the

<os/log.h>
header.
#include <os/log.h>

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"