tidev / node-ios-device

Queries connected iOS devices and installs apps
Other
122 stars 37 forks source link

v2.0.0 #47

Closed cb1kenobi closed 5 years ago

cb1kenobi commented 5 years ago

fix: Fixed deviceColor to resolve correct value instead of a number. BREAKING CHANGE: Dropped support for Node.js 0.10 through 7.x. BREAKING CHANGE: Refactored public API to use async/await instead of callbacks. chore: Updated to latest Node.js build targets. chore: Updated npm deps. feat: Switched from 'debug' to 'snooplogg'.

ssjsamir commented 5 years ago

Did some some quick Functional tests on this using the steps mentioned in: https://jira.appcelerator.org/browse/DAEMON-279

Observations/Potential issues:

  1. Unable to build to an ipad (iOS 11.4, iPad Mini 3) When running npm test ornode bin/node-ios-device install test/TestApp/build/Release-iphoneos/TestApp.app. The app would fail to install. When running npm test the following error can be seen (device shows up when doing an 'appc info'):

    Error [ERR_INSTALL]: Failed to install app on device (0xe800007e)
      at EventEmitter.install (src/index.js:83:10)
      at Context.<anonymous> (test/test-node-ios-device.js:153:13)

    When running node bin/node-ios-device install test/TestApp/build/Release-iphoneos/TestApp.appthe following error can be seen: Failed to install app on device (0xe800007e)

  2. When running npm test Watch(): Test hangs when unplugging device without throwing any errors/warnings.

  3. When running node bin/node-ios-device ls and unplugging device an unclear error is shown.

    []
    Assertion failed: (0), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 278.
    Abort trap: 6
  4. Known Issue: syslog()/forward() does not emit "end" event when device is disconnected.

  5. I was also unclear on what node bin/node-ios-device watch did is it just to fire a 'change' event when a device is plugged in or unplugged, if so everything looks good.

  6. (Minor) In the test steps (https://jira.appcelerator.org/browse/DAEMON-279.) it mentions node bin/node-ios-device forward <udid> 12345 but it looks like the step should be node bin/node-ios-device forward 12345 <udid>

Test Environment

MacOS Mojave version 10.14.4
Xcode 10.2.1
Node.js ^8.12.0 / 10.2.0
iPhone 6s (12.1).
iPad Mini 3 (iOS 11.4)
8.2.0.v20190613130716
"NPM":"4.2.14-3","CLI":"7.0.10"
ssjsamir commented 5 years ago

After recent changes some of the above following issues have been fixed but I still sometimes see the following:

  1. When disconnecting the device after doing node bin/node-ios-device forward 12345 <udid> a Segmentation fault error is shown (occurs intermittently)

    Execution time = 18.000998
    Segmentation fault: 11
  2. syslog()/forward()Does end when a device is disconnected but nothing is shown indicating device has been disconnected (if this is intended ignore)

  3. When running node bin/node-ios-device ls and unplugging device I can still sometimes see: (happens rarely now unlike before where it happened every time)

    item-ax31038:node-ios-device Samir$ node bin/node-ios-device ls
    []
    Assertion failed: (0), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 278.
    Abort trap: 6

    Test Environment

    MacOS Mojave version 10.14.4
    Xcode 10.2.1
    Node.js ^8.12.0
    iPhone 6s (12.1).
    iPad Mini 3 (iOS 11.4)
    8.2.0.v20190613130716
    "NPM":"4.2.14-3","CLI":"7.0.10"
cb1kenobi commented 5 years ago

@ssjsamir I think I fixed everything. When you get some time, can you please give this PR another try? Thanks!

ssjsamir commented 5 years ago

FR Looks good with the latest changes unable to see any of the above issues. Test Environment

MacOS Mojave version 10.14.4
Xcode 10.2.1
Node.js ^8.12.0
iPhone 6s (12.1).
iPad Mini 3 (iOS 11.4)
8.2.0.v20190613130716
"NPM":"4.2.14-3","CLI":"7.0.12"