Error: Cannot read property 'replace' of undefined when building iOS Cordova

前端 未结 9 1521
醉话见心
醉话见心 2020-12-23 09:32

I created a cordova project using cordova create project hello com.hello Hello.

And added iOS platform using cordova platform add iOS. And

9条回答
  •  不知归路
    2020-12-23 10:12

    Updating the ios-sim version with npm install ios-sim@latest didn't worked for me. But if found a nice and easy solution on Github.

    1. Open /platforms/ios/cordova/node_modules/ios-sim/src/lib.js
    2. Search for deviceName with your code editor
    3. Replace name_id_map[ deviceName ] with name_id_map[filterDeviceName(deviceName)]

    You can find the Github post here

提交回复
热议问题