Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27442] iOS: Investigate other means of debug logging simulator builds

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS, Tooling
Labelscb-tooling, ioslib
ReporterChris Barber
AssigneeChris Barber
Created2019-10-03T16:30:21.000+0000
Updated2020-03-06T21:40:17.000+0000

Description

The strategy for relaying log messages from a Titanium app running from the iOS Simulator has evolved over the years. Titanium started by writing logs to a file and the CLI would tail the log file. In Titanium 6, this was replaced with a client/server system to reuse code between device and sim builds, but this causes complications for sim builds (TIMOB-27331). Titanium SDK 8.2.1 reverts this functionality back to file-based logging for sim builds. One concern is that apparently the file-based logging will not print messages from Swift code. This ticket is investigate logging from Swift code as well as using the Console app or simctl to relay the log messages. In macOS Sierra, the Console app added support for simulator apps. Now that we have ended support for macOS older than Sierra, we can now entertain the idea of relaying logs from the Console app. Need to look into streaming the output from xcrun simctl spawn <UDID> log stream.

Comments

  1. Jan Vennemann 2019-10-08

    [~cbarber], I did some testing with simctl log stream and created a quick proof of concept here: https://github.com/appcelerator/titanium_mobile/compare/master...janvennemann:syslog-poc It works fine on Xcode 9 through 11. I couldn't test with Xcode 8 since i'm running MacOS Mojave and Xcode 8 is only compatible with High Sierra and lower. On my system this is greatly improving performance as the log file approach eats up 50-60% of my CPU while it is active.

JSON Source