cordova构建项目时的问题
# Cannot read property 'toLowerCase' of undefined
solution:
Replace the availableDevices function in platforms/ios/cordova/lib/list-emulator-build-targets-with the following:
var availableDevices = Object.keys(devices).reduce(function (availAcc, deviceCategory) {
var availableDevicesInCategory = devices[deviceCategory];
availableDevicesInCategory.forEach(function (device) {
if (device && device.name === deviceType.name.replace(/\-inch/g, ' inch') && device.isAvailable == true) {
availAcc.push(device);
}
});
return availAcc;
}, []);
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
参考地址:Cordova build iOS (opens new window)
# Status of Xcode 10 support
参考ANNOUNCEMENT Status of Xcode 10 support (opens new window)
If you are building on the command-line, you can specify --buildFlag="UseModernBuildSystem=0"
# Cordova CLI
cordova run ios --buildFlag='-UseModernBuildSystem=0'
cordova build ios --buildFlag='-UseModernBuildSystem=0'
# Ionic CLI
ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"ag=
1
2
3
4
5
6
7
2
3
4
5
6
7
If you're building with a build.json config file, you can add the following under the iOS release or debug config:
"buildFlag": [
"-UseModernBuildSystem=0"
]
1
2
3
2
3
在Github上编辑此页 (opens new window)
上次更新: 3/22/2021, 3:14:54 AM