You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/19 18:00:01 UTC

[jira] [Commented] (CB-13155) Running windows app through cordova CLI in an emulator produces error

    [ https://issues.apache.org/jira/browse/CB-13155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332656#comment-16332656 ] 

ASF GitHub Bot commented on CB-13155:
-------------------------------------

janpio closed pull request #240: CB-13155: Improved target parsing
URL: https://github.com/apache/cordova-windows/pull/240
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/template/cordova/lib/package.js b/template/cordova/lib/package.js
index 6269885f..d811f4da 100644
--- a/template/cordova/lib/package.js
+++ b/template/cordova/lib/package.js
@@ -147,7 +147,10 @@ module.exports.findDevice = function (deploymentTool, target) {
             return Q.resolve(deviceList[0]);
         } else {
             var candidateList = deviceList.filter(function (device) {
-                return device.index === parseInt(target, 10);
+                var deviceIndexEqualsTarget = device.index === parseInt(target, 10);
+                var deviceNameContainsTarget = device.name.toLowerCase().indexOf(target.toLowerCase()) >= 0;
+                
+                return deviceIndexEqualsTarget || deviceNameContainsTarget;
             });
 
             if (candidateList.length > 0) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Running windows app through cordova CLI in an emulator produces error
> ---------------------------------------------------------------------
>
>                 Key: CB-13155
>                 URL: https://issues.apache.org/jira/browse/CB-13155
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-windows
>    Affects Versions: Master
>         Environment: *OS:* Windows 10
> *Ver:* 1703
> *Build:* 15063.413
> *Processor:* i3
> *Cordova Version:* 7.0.1
> *Cordova-windows:* 5.0.0
>            Reporter: Ayan Dey
>            Assignee: Alexander Sorokin
>            Priority: Major
>              Labels: triaged
>
> I am trying to run a windows app on an emulator using the command given in the docs but it gives out errors.
> **Command:** `cordova run windows --target="Mobile Emulator 10.0.14393.0 720P 5 inch 1GB" -- --appx=8.1-phone`
> **Result:** `Error: Specified device not found`
> **Command:** `cordova run windows --target=4 -- --appx=8.1-phone`
> **Result:** _The emulator runs_
> **Command:** `cordova run windows --target="Mobile Emulator 10.0.14393.0 720P 5 inch 1GB" -- --appx=uap`
> **Result:** `Error: Deploying desktop apps to specific target not supported`
> **Command:** `cordova run windows --target=4 -- --appx=uap`
> **Result:** `Error: Deploying desktop apps to specific target not supported`
> **Command:** `cordova run windows --target=4 -- --appx=uap --emulator`
> **Result:** `Error: Deploying desktop apps to specific target not supported`
> **Command:** `cordova run windows --target=4 -- --appx=uap --archs="arm"`
> **Result:** `Error: Deploying desktop apps to specific target not supported`
> *CONFIG.XML*
> <?xml version='1.0' encoding='utf-8'?>
> <widget id="com.crosby.controller" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
>     <name>Crosby</name>
>     <description>
>         A remote controller for Crosby room cleaning bot
>     </description>
>     <author email="ayand04@gmail.com" href="http://ayandey.com">
>         Ayan Dey
>     </author>
>     <content src="index.html" />
>     <access origin="*" />
>     <allow-intent href="http://*/*" />
>     <allow-intent href="https://*/*" />
>     <allow-intent href="tel:*" />
>     <allow-intent href="sms:*" />
>     <allow-intent href="mailto:*" />
>     <allow-intent href="geo:*" />
>     <preference name="Orientation" value="landscape" />
>     <platform name="android">
>         <allow-intent href="market:*" />
>     </platform>
>     <platform name="windows">
>         <preference name="windows-target-version" value="10.0" />
>     </platform>
>     <engine name="windows" spec="^5.0.0" />
> </widget>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org