WatchOS2 and NSLog on device

I am using XCode 7 (beta) to write a standalone watchOS2 app extension.

The debugger works fine, so I can use breakpoints, for example, but does NSLog()

n't seem to work for Watch. Note : it works fine on the simulator, but not on the device

Everything I write in NSLog(@"..")

does not appear in the debug area .

So the question is:

Is this behavior expected or am I doing something wrong? Are there ways to bypass some of the debug logs, for example, can I use WatchConnectivity?

Thanks in advance!

+3


source to share


2 answers


While NSLog () doesn't work on real watchOS 2 devices, I ended up using - [WCSession sendMessage: replyHandler: errorHandler:] to send log lines from my watchOS 2 app back to my iPhone iOS app and then NSLogs from my phone.



0


source


Have you tried this

This is a known issue on the developer forum.



You need to disconnect and reconnect your watch to trust your computer.

Then you can see NSLog in the debug area.

0


source







All Articles