在Windows7上使用phonegap创建iPhone应用程序 [英] Creating iPhone app using phonegap on Windows7
问题描述
C:\soft\my-app> phonegap create something
pre>
[phonegap] create使用选项C:\soft\my-app\ something com.phonegap.helloworld HelloWorld
[phonegap]定制默认config.xml文件
[phonegap]在C:\soft\my-app\something创建项目
cd something
C:\soft\my-app\something> phonegap build ios
[phonegap]检测iOS SDK环境...
[phonegap]使用本地环境
[phonegap]添加iOS平台...
{[CordovaError:平台ios的应用程序不能在此操作系统上构建 - win32。]
名称: 'cordovaError',
消息:'应用程序的平台ios不能建立在这个操作系统 - win32。'}
[错误]应用程序的平台ios不能建立在这个操作系统 - win32。
[phonegap]使用远程环境
{[错误:ENOENT,打开'C:\soft\my-app\something\www\config.xml']
errno:34,
code:'ENOENT',
路径:'C:\\soft\\mymy-app\\something\\www\\config .xml'}
[错误] ENOENT,打开C:\soft\my-app\something\www\config.xml
当我看到Windows信息(右键点击我的电脑)它显示Windows操作系统为64位。
可能是什么原因导致此问题?我试图在Windows 7上开发iphone应用程序。我安装node.js和phonegap使用以下命令:npm install -g phonegap
我需要安装cordova吗? / p>
解决方案Scott Hunter说的不完全是真的,你可以使用windows构建IOS。
它将使用 phonegap build 编译代码,如此行[phonegap] using the远程环境
我有与OP相同的问题,但我认为它的一个错误。因为我以前没有问题,只是最近升级并尝试创建一个新项目。
编辑:降级到较旧的版本应该工作,它看起来像:
npm -g install phonegap@3.5.0-0.21.18C:\soft\my-app>phonegap create something [phonegap] create called with the options C:\soft\my-app\something com.phonegap.helloworld HelloWorld [phonegap] Customizing default config.xml file [phonegap] created project at C:\soft\my-app\something cd something C:\soft\my-app\something>phonegap build ios [phonegap] detecting iOS SDK environment... [phonegap] using the local environment [phonegap] adding the iOS platform... { [CordovaError: Applications for platform ios can not be built on this OS - win32.] name: 'CordovaError', message: 'Applications for platform ios can not be built on this OS - win32.' } [error] Applications for platform ios can not be built on this OS - win32. [phonegap] using the remote environment { [Error: ENOENT, open 'C:\soft\my-app\something\www\config.xml'] errno: 34, code: 'ENOENT', path: 'C:\\soft\\my-app\\something\\www\\config.xml' } [error] ENOENT, open 'C:\soft\my-app\something\www\config.xml'
When I look at windows information (Right click on my computer) it shows windows OS as 64 bit.
What could be causing this issue ? I am trying to develop iphone app on windows 7. I installed node.js and phonegap using following command: npm install -g phonegap
Do I need to install cordova ?
解决方案What Scott Hunter said isn't entirely true, you can build IOS using windows. It will use phonegap build to compile the code as is shown by this line "[phonegap] using the remote environment"
I am having the same issue as OP though, I'm thinking its a bug. As I haven't had issues in the past and just recently upgraded and tried to create a new project.
Edit: Downgrading to an older version should work, its looking like: npm -g install phonegap@3.5.0-0.21.18
这篇关于在Windows7上使用phonegap创建iPhone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!