Cordoba cannot read the 'name' of undefined property with --target

When I run the ionic / cordova emulator command with the specified --target option, I get that it cannot read the 'name' property of the undefined error. Interestingly, someone else got this earlier, and if there is a fix available.

Run commands: ionic cordova emulate ios --target = "iPhone-6, 10.3" and ion cordova emulate ios -target "iPhone-6, 10.3"

Here is my ion information

cli packages:

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1 

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.1.2 ios 4.4.0
Ionic Framework    : ionic-angular 3.6.0

System:

Android SDK Tools : 25.2.2
ios-deploy        : 1.8.5 
ios-sim           : 6.0.0 
Node              : v6.8.1
npm               : 3.10.8 
OS                : macOS Sierra
Xcode             : Xcode 8.3.3 Build version 8E3004b 
+5
source share
5 answers

( ):

cordova run ios --list
Available ios devices:
Available ios virtual devices:

, , Ionic ios-sim 4.4.0.

cd platforms/ios/cordova && npm install ios-sim@latest
$ cd ../../../
$ cordova platform rm ios
$ cordova platform add ios@4.5.0
$ ionic cordova emulate ios --target --list
> cordova run ios --list --target --emulator
Available ios devices:

Available ios virtual devices:

iPhone-5s, 11.0
iPhone-6, 11.0
iPhone-6-Plus, 11.0
iPhone-6s, 11.0
iPhone-6s-Plus, 11.0
iPad-Air, 11.0
iPad-Air-2, 11.0
iPhone-7, 11.0
iPhone-7-Plus, 11.0
iPhone-SE, 11.0
iPad--5th-generation-, 11.0
iPad-Pro--12-9-inch---2nd-generation-, 11.0
iPad-Pro--10-5-inch-, 11.0
Apple-Watch-38mm, watchOS 4.0
Apple-Watch-42mm, watchOS 4.0
Apple-Watch-Series-2-38mm, watchOS 4.0
Apple-Watch-Series-2-42mm, watchOS 4.0
Apple-TV-1080p, tvOS 11.0
Apple-TV-4K-4K, tvOS 11.0
Apple-TV-4K-1080p, tvOS 11.0
iPad-Pro--9-7-inch-, 11.0
iPad-Pro, 11.0

, Git

+6

iOS. :

cordova emulate ios --target "iPhone-7"
+5

, :

issues.apache.org: cordova emulate ios --target throws undefined error

, cordova-ios@4.5.0

sudo npm install cordova-ios@latest

, , 🙂

, .

+1

Xcode 10.3

  1. Xcode iOS, . ( Android Studio... ...) Download simulators
    1. , Cordova Run IOS --list .

In Xcode 10.3 I had to open Xcode and select iOS version I wanted to test.  (Like Android Studio.) Then, ** cordova run ios --list ** returned stuff.

0

Source: https://habr.com/ru/post/1684053/


All Articles