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:
https://developer.apple.com/documentation/os/logging
https://developer.apple.com/videos/play/wwdc2016/721/
Because you forgot to
import os
at the start of this file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With