Flutter run support for iOS 10 (#6028)

With iOS 10, the syslog format changed from:
Sep 23 16:04:17 cbracken-iPhone Runner[6188] <Info>: .*

to:
Sep 23 16:04:17 cbracken-iPhone Runner(libsystem_asl.dylib)[6188] <Info>: .*

This updates the observatory port scraping to handle either case.
This commit is contained in:
Chris Bracken 2016-09-23 16:59:03 -07:00 committed by GitHub
parent 077cf74f84
commit fea4a91ab6

View File

@ -431,8 +431,11 @@ class _IOSDeviceLogReader extends DeviceLogReader {
});
}
// Match for lines like "Runner[297] <Notice>: " in syslog.
static final RegExp _runnerRegex = new RegExp(r'Runner\[[\d]+\] <[A-Za-z]+>: ');
// Match for lines for the runner in syslog.
//
// iOS 9 format: Runner[297] <Notice>:
// iOS 10 format: Runner(libsystem_asl.dylib)[297] <Notice>:
static final RegExp _runnerRegex = new RegExp(r'Runner[(.*)]\[[\d]+\] <[A-Za-z]+>: ');
void _onLine(String line) {
Match match = _runnerRegex.firstMatch(line);