Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-279] node-ios-device: Refactor to use N-API

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusResolved
ResolutionFixed
Resolution Date2019-07-01T18:33:50.000+0000
Affected Version/sn/a
Fix Version/sAppc Daemon 2.3.0
Componentsnode-ios-device
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2019-06-05T03:08:12.000+0000
Updated2019-07-01T18:33:50.000+0000

Description

node-ios-device uses nan (Native Abstractions for Node.js) and whenever there's a new major version of Node, something breaks. To future-proof node-ios-device, we need to adopt Node's N-API.

Comments

  1. Chris Barber 2019-06-21

    PR: https://github.com/appcelerator/node-ios-device/pull/47

    Testing Prerequisites

    Xcode, Node, npm, and iOS devices, lots of iOS devices.

    Testing Steps

    1. Check out the source and build:
       git clone https://github.com/appcelerator/node-ios-device.git
       cd node-ios-device
       git checkout -b v2 origin/v2
       npm i
       
    2. You should probably manually open test/TestApp/TestApp.xcodeproj and build it to make sure the provisioning profiles are in order. 3. Run the unit tests:
       npm test
       
    The tests will install the TestApp. Midway through the tests, it will print a message to launch the TestApp on device. You have 15 seconds. Go! 4. Run the CLI:
       node bin/node-ios-device
       
       node bin/node-ios-device ls
       
       node bin/node-ios-device watch
       
       node bin/node-ios-device install test/TestApp/build/Release-iphoneos/TestApp.app
       
       node bin/node-ios-device syslog <udid>
       
       node bin/node-ios-device forward 12345 <udid>
       

    Testing Cases

    * Node.js ^8.12.0 and >= 10.2.0 * macOS Mojave and Catalina * 0 to 2 devices * iPhones, iPads, whatever you have * Unplug device while performing an action Keep an eye out for fatal errors: seg faults, mutex lock fails, libuv close errors, deadlocks, and other nasty issues.

JSON Source