I created a simple app in Xcode. Installed and ran it in the iOS Simulator. I can also start it from command line like this:
% xcrun simctl launch booted com.example.TestBuildCommands --console
com.example.TestBuildCommands: 52877
%
It just prints that one line and returns my shell prompt. But the help
for launch
says that --console
should: "Block and print the application's stdout and stderr to the current terminal."
In my main()
function I have:
int main(int argc, char * argv[]) {
printf("In main.\n");
...
Shouldn't I be seeing that message in my terminal screen?
% xcrun simctl help launch
Launch an application by identifier on a device.
Usage: simctl launch [-w | --wait-for-debugger] [--console|--console-pty] [--stdout=<path>] [--stderr=<path>] [--terminate-running-process] <device> <app bundle identifier> [<argv 1> <argv 2> ... <argv n>]
--console Block and print the application's stdout and stderr to the current terminal.
Signals received by simctl are passed through to the application.
(Cannot be combined with --stdout or --stderr)
[...]
ps. Anyone know how to turn off syntax highlighting in those triple-backquoted code blocks that are meant to be just terminal text, not highlighted code?