I'm trying to use the new os_log API, by logging a simple statement: os_log("Hello")
And I get an error for os_log: Use of unresolved identifier 'os_log'
I also tried wrapping it in a block, like this
if #available(iOS 10.0, *) {
let foo: StaticString = "Something happened."
os_log(foo)
}
And I still get the same error. I would like to use this in Swift 4.
I looked for possible frameworks that might be required, and found no likely candidates.
I found no solution from these links either:
Because you forgot to
import os
at the start of this file.