问题
C:\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 ?
回答1:
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
回答2:
You can't build an iOS app on anything other than Mac OSX.
来源:https://stackoverflow.com/questions/26416270/creating-iphone-app-using-phonegap-on-windows7