Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tail logs after running #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/run_ios_app
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ xcrun instruments -w "$uuid" 2>/dev/null

xcrun simctl install booted "$app_path"
xcrun simctl launch booted "$app_id"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use the --console flag?

$ xcrun simctl help launch
Usage: simctl launch [-w | --wait-for-debugger] [--console] [--stdout=<path>] [--stderr=<path>] <device> <app 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)
	--stdout=<path> Redirect the application's standard output to a file.
	--stderr=<path> Redirect the application's standard error to a file.
		Note: Log output is often directed to stderr, not stdout.

If you want to set environment variables in the resulting environment, set them in the calling environment with a SIMCTL_CHILD_ prefix.

tail -f "$HOME/Library/Logs/CoreSimulator/$uuid/system.log"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above. --console flag works better for me as it doesn't pollute the output with non-app logs.