-
-
Notifications
You must be signed in to change notification settings - Fork 424
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
Use appium-ios-device
instead of idevicesyslog
#1000
Conversation
lib/device-log/ios-simulator-log.js
Outdated
firstLine = false; | ||
} | ||
} else { | ||
this.logRow += stdout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there might be a potential memory leak
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine. The code already runs in appium-ios-driver
for years. I wan't to clean it up later
lib/device-log/ios-simulator-log.js
Outdated
onOutput (prefix = '') { | ||
const logs = this.logRow.split('\n'); | ||
onOutput (logRow, prefix = '') { | ||
const logs = _.cloneDeep(logRow).split('\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather clone the result of split, because internally string.split does not create new string instances, but rather pointers to the original big string (which prevents it to be garbage collected if at least one of these slices is still used somewhere)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
e22f3c8
to
acefab6
Compare
xcodeVersion: this.xcodeVersion, | ||
}); | ||
|
||
if (this.isRealDevice()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a ternary operator might take less lines of code ;)
Changes
appium-ios-driver
appium-ios-device
TODO
realDeviceLogger
capability completely