Description
When a device is not connected to a PC but its on the same network as the PC, when building a project for wp-device then it will still show up as available. This is because the utility used to obtain the device information, WinAppDeploy, supports deployment of an app over wifi and therefore will detect devices on wifi. See the below output for the differences between the output.
However, I believe that for this to happen the device needs to have 'Device Discovery' in 'For Developers' enabled. I am not sure whether this is enabled by default.
It is possible to deploy to a device over the network, but as far as I know this is not supported yet so for now we should filter devices that are displayed by the tool but appear to be connected over the network.
C:\Users\ewanh>"C:\Program Files (x86)\Windows Kits\10\bin\x86\WinAppDeployCmd.exe" devices
Windows App Deployment Tool
Version 10.0.0.0
Copyright (c) Microsoft Corporation. All rights reserved.
Discovering devices...
IP Address GUID Model/Name
127.0.0.1 00000015-4e57-1877-0000-000000000000 Lumia 930 (RM-1045)
C:\Users\ewanh>"C:\Program Files (x86)\Windows Kits\10\bin\x86\WinAppDeployCmd.exe" devices
Windows App Deployment Tool
Version 10.0.0.0
Copyright (c) Microsoft Corporation. All rights reserved.
Discovering devices...
IP Address GUID Model/Name
192.168.2.10 00000015-4e57-1877-0000-000000000000 Lumia930
Steps to reproduce
1. Connect a device by USB and run
"C:\Program Files (x86)\Windows Kits\10\bin\x86\WinAppDeployCmd.exe" devices
2. Run
appc run -p windows -T wp-device
3. Disconnect the USB and ensure the device is on the same network as your PC
4. Run
appc run -p windows -T wp-device
Actual result
2. The device will be shown
4. The device will be shown
Expected result
The device should only be shown when the device is able to be built to, ie connected by USB
titanium_mobile_windows: https://github.com/appcelerator/titanium_mobile_windows/pull/622 5_3_X: https://github.com/appcelerator/titanium_mobile_windows/pull/624
Verified as fixed , I am not able to see the device after it has been disconnected. Tested on: Microsoft Lumia 640 (10) Windows 10 Studio: 4.6.0.201604190855 Ti SDK: 5.3.0.v20160420090405 Appc NPM: 4.2.5-3 App CLI: 5.3.0-21 Node v4.4.3 Closing Ticket.