问题
We can log with NSlog in other view in iOS 8 (Xcode Beta Version).
However, I can't NSLog in keyboard extension in KeyboardViewController. It didn't appear in log.
NSLog(@"viewdidload in keyboard");
I would like to know how to detect/log in real time.
回答1:
You just don't see what is being logged in the debug area of Xcode because the Xcode debugger isn't attached to your extension. Extensions are nearly completely independent from their containing app.
Answered here: for physical device: https://stackoverflow.com/a/24050325/1453948 for simulator: https://stackoverflow.com/a/24043265/1453948
So in case of simulator go to Simulator menu Debug -> Open System Log
来源:https://stackoverflow.com/questions/24051821/keyboardviewcontroller-nslog-ios-8