ERROR构建其中一个平台:IOS

时间:2015-09-22 10:32:14

标签: ios cordova mobile ionic-framework ionic

关于启动和运行移动混合应用程序的离子课程,我偶然发现了一步:

$ ionic build ios

以下错误是:

$ ionic build ios
Running command: "c:\Program Files (x86)\nodejs\node.exe##c:\wamp\www\weather\hooks\after_prepare\010_add_platform_    class.js c:/wamp/www/weather
add to body class: platform-ios
Running command: cmd "/s/c"c:\wamp\www\weather\platforms\ios\cordova\build""
'c:\wamp\www\weather\platforms\ios\cordova\build' is not recognized as an internal or external command,
operable program or batch file.
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone        (c:\Users\Acer\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

我对离子构建android没有麻烦。 你可以帮我解决一下问题的来源吗? Tnx提前!

1 个答案:

答案 0 :(得分:5)

我看到你使用Windows。

  

注意:iOS开发需要Mac OS X.

来源:http://ionicframework.com/getting-started/

如果你真的需要为iOS构建,你需要购买一台Mac(是的,这真的很难过)或使用处理这种情况的解决方案,如Phonegap。 如果我记得很清楚,Ionic团队正在研究解决这个问题的解决方案,但还没有准备好。