I've been playing around with the new custom keyboard application extension API in iOS 8, using Swift as my language of choice. One thing I've noticed, however, is that println
doesn't seem to ever print any output to the console, presumably because those statements are being executed in an application extension rather than the containing app. Has anyone found a way to print statements to the console from within an application extension?
Your most reliable choice is to use NSLog
for debugging purposes, but println
might actually be working in this case. You just need to attach the Xcode debugger to the extension itself.
In my experience, it's a rather buggy process. This answer has more info on the subject. In short, you need to change the target in the Run drop down to your extension, then after you click run you should get a list of things you can run it in.
As of iOS 10, extensions don't log to console by default. To enable console logging for your extension:
OS_ACTIVITY_MODE
value: disable
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