xcode 在 iOS 上安装 Phonegap

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11733575/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:04:49  来源:igfitidea点击:

Installing Phonegap on iOS

iosxcodecordova

提问by Samar

Recently I was trying to install Cordova onto my mac so I can compile for the iphone, but I ran into a problem. The option to create a Cordova project wasn't there on xcode. I looked online and saw that I needed to create the project through the terminal. I did this, but nothing was created as far as I can see.

最近我试图将 Cordova 安装到我的 mac 上,以便我可以为 iphone 编译,但我遇到了一个问题。xcode 上没有创建 Cordova 项目的选项。我在网上看了一下,发现需要通过终端创建项目。我这样做了,但就我所见,没有任何东西被创建。

On the terminal, after dragging the bin folder to the terminal I did: ./create /desktop/ios-program/ com.appname appname

在终端上,将 bin 文件夹拖到终端后我做了: ./create /desktop/ios-program/ com.appname appname

Did I do something wrong? Thanks

我做错什么了吗?谢谢

回答by Shahid Aslam

http://docs.phonegap.com/en/2.7.0/guide_getting-started_ios_index.md.html

http://docs.phonegap.com/en/2.7.0/guide_getting-started_ios_index.md.html

These instructions are pretty clear, even if the directory tree you get after extracting the zip file is not exactly the one they show.

这些说明非常清楚,即使您在解压缩 zip 文件后获得的目录树与它们显示的目录树不完全相同。

After installing all the requirements:

安装所有要求后:

1. extract the content of phonegap-2.7.0.zip wherever you want
2. go to lib/ios/bin and run the create command with the suggested parameters.
3. open the finder and go to the directory you used as first parameter
4. doubleclick the file with extension xcodeproj to open XCode and the project will be automatically created

回答by Adarsh V C

Make sure that you are inside \phonegap-2.7.0\lib\ios\bin before entering ./createcommand. Refer the Blog Tutorial

在输入./create命令之前,请确保您在 \phonegap-2.7.0\lib\ios\bin 内。参考博客教程