标签:and targe 升级 ios device undefined type build amp
XCode升级到9或10后,cordova build时报错:toLowerCase of undefined...
解决方案:
修改platforms/ios/cordova/lib/list-emulator-build-targets文件第53行左右。原来的代码:
if (device.name === deviceType.name.replace(/\-inch/g, ‘ inch‘) &&
device.availability.toLowerCase().indexOf(‘unavailable‘) < 0) {
availAcc.push(device);
}
修改为:
if (device.name === deviceType.name.replace(/\-inch/g, ‘ inch‘)) {
if ((device.availability && device.availability.toLowerCase().indexOf(‘unavailable‘) < 0)
|| device.isAvailable == ‘YES‘) {
// XCode 10 and lower
availAcc.push(device);
}
}
XCode9和10编译Cordova报错toLowerCase of undefined解决方案
标签:and targe 升级 ios device undefined type build amp
原文地址:https://www.cnblogs.com/oliverreal/p/9859343.html