apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 986 forks source link

xcodebuild was not found. After upgrading to Cordova 7.0.1 from Cordova 6.1.0 #1385

Closed AdrianTeamMatrix closed 6 months ago

AdrianTeamMatrix commented 6 months ago

Issue Type

Description

After upgrading to Cordova 7.0.1 from Cordova 6.1.0 and building with ionic cordova build ios I get the error

xcodebuild was not found. Please install version 11.0.0 or greater from App Store.

I even tried with ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0" same error

xcodebuild was not found. Please install version 11.0.0 or greater from App Store CordovaError: xcodebuild was not found. Please install version 11.0.0 or greater from App Store at checkTool (C:......\node_modules\cordova-ios\lib\check_reqs.js:95:31) at Object.module.exports.run.module.exports.check_xcodebuild (C:......\node_modules\cordova-ios\lib\check_reqs.js:44:12) at Api.build (C:......\node_modules\cordova-ios\lib\Api.js:558:27) at C:\Users...\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\compile.js:38:30 at C:\Users...\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\util\promise-util.js:28:24 at processTicksAndRejections (node:internal/process/task_queues:96:5)

Information

Ionic:

Ionic CLI : 5.4.16 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 11.0.0 Cordova Platforms : android 11.0.0, ios 7.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, cordova-plugin-ionic 5.5.3, (and 21 other plugins)

Utility:

cordova-res : not installed native-run : 1.7.1

System:

NodeJS : v16.20.2 (C:\Program Files\nodejs\node.exe) npm : 8.19.4 OS : Windows 10

Command or Code

ionic cordova build ios ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

Environment, Platform, Device

Windows 11

Version information

Checklist

breautek commented 6 months ago

Mac OS with XCode is required to build ios apps.

Windows isn't supported.

AdrianTeamMatrix commented 6 months ago

Thanks but I am using Ionic framework that will build for Android and iOS. Which did work before the upgrade

breautek commented 6 months ago

With all due respect, this was always a requirement. Apple does not provide build tools for any operating system other than Mac OS. Apache Cordova has never supported building iOS on windows.

If the ionic framework allowed you to build iOS projects on Windows and it worked, then they were doing something hacky and potentially against Apple's terms of service. But even Ionic's cordova legacy and their newer capacitor project path both claims that XCode is required, which is only avialable on MacOS.