I recommend that you use a unique log subsystem to make it easier to search for your log messages. For example:
final class PacketFilterProvider: NEFilterPacketProvider {
override init() {
os_log(.debug, log: self.log, "init")
super.init()
}
private let log = OSLog(subsystem: "com.example.apple-samplecode.PacketFilterTest", category: "provider")
…
}
That way I can search on my subsystem and see all my log messages, grouped by category.
If you still can’t see your log messages, it means that your provider isn’t even starting to load. There’s a whole world of ways that this can go wrong. First things first, are you sure your system extension started correctly? I have a similar log point at the start of
main
in my sysex so that I can confirm that it loaded.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"