ios-control / ios-sim

Command-line application launcher for the iOS Simulator
Apache License 2.0
1.49k stars 253 forks source link

ios app logs are not printing to stdout with ios 9.0 #181

Open ChinmayeeVasisht opened 8 years ago

ChinmayeeVasisht commented 8 years ago

I am on ios-sim version 5.0.2 , when i launch an iPad app on iPad 2 (9.0) , i see that logs related to my app is not being redirected to stdout, i only see the simulator logs.

ios-sim launch appname.app --devicetypeid iPad-2 --log /tmp/ipad.log

I see only NSLogs, but the C++ portion of the logs are not printed. It used to work fine with 3.x ios-sim version with iOS Simulator 8.1

With ios-sim version 3.0.0 on Mac 10.10.5 OS , i see this warning - 2015-10-15 20:27:09.062 ios-sim[8205:7959568] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-8201/DVTFoundation/PlugInArchitecture/PlugInManager/DVTPlugInManager.m:257 Details: Requested but did not find extension point with identifier Xcode.DVTFoundation.DevicePlatformMapping Object: <DVTPlugInManager: 0x7fa693796fc0> Method: -extensionPointWithIdentifier: Thread: <NSThread: 0x7fa6934105a0>{number = 1, name = main} Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

warning goes away after i upgrade to latest ios-sim, but logs are still not seen

JarvisCoder commented 8 years ago

any update on this one ?

canberkozcelik commented 8 years ago

I've similar issue with c++ gtest logs, I can't get them by using --log option

shazron commented 8 years ago

This is correct, it's only tracking logs printed using NSLog. Currently I don't have a solution to grab the other type of logs, 3.x used a different mechanism that is not used here (this is basically just a grab of the log spit out by the Simulator itself).

shazron commented 8 years ago

You'll probably have to do some redirection yourself of the C/C++ logs through dup2 etc if you have access to the source and have the filehandle: https://www.bignerdranch.com/blog/hijacking-for-fun-and-profit/