ios 如何使用cordova 1.5和xcode 4.2创建“Hello World”iPhone应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9699729/
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
How to create a "Hello World" iPhone App with cordova 1.5 and xcode 4.2?
提问by Balaji Kandasamy
I want to create an Hello World iPhone app using Cordova1.5 and xcode 4.2 I have installed latest version of phonegap(cordova1.5) in Xcode 4.2. How can I create a Helloworld app. Can anyone send me useful links for creating apps with cordova1.5 and xcode 4.2 ?
我想使用 Cordova1.5 和 xcode 4.2 创建一个 Hello World iPhone 应用程序 我已经在 Xcode 4.2 中安装了最新版本的 phonegap(cordova1.5)。如何创建 Helloworld 应用程序。任何人都可以向我发送使用cordova1.5 和xcode 4.2 创建应用程序的有用链接吗?
回答by dhaval
PhoneGap has a lot of tutorial already available which you can check from here:
PhoneGap 已经有很多可用的教程,您可以从这里查看:
http://wiki.phonegap.com/w/page/35501397/Tutorials
http://wiki.phonegap.com/w/page/35501397/Tutorials
For simple helloworld though you can follow these steps:
对于简单的 helloworld,您可以按照以下步骤操作:
- Open XCode and create a new project with "Cordova-based Application" template
- Give project name and Un-select the "Use Automatic Reference Counting"
- XCode will create a template project
- Run the application first time and it will generate the additional /www folder in the project directory
- Select the project and go to
File
->Add Files to "your project"
->Select /www folder from project directory and add as a reference in project
- Re-run again and you should see the alert dialog saying "Cordova is working"
- 打开 XCode 并使用“基于 Cordova 的应用程序”模板创建一个新项目
- 提供项目名称并取消选择“使用自动引用计数”
- XCode 将创建一个模板项目
- 第一次运行应用程序,它将在项目目录中生成额外的 /www 文件夹
- 选择项目并转到
File
->Add Files to "your project"
->Select /www folder from project directory and add as a reference in project
- 再次重新运行,您应该会看到警告对话框说“Cordova 正在工作”
You can check the same tutorial with screenshot at here
您可以在此处使用屏幕截图查看相同的教程
回答by Coder_sLaY
Just Follow this link Phonegap Link
只需关注此链接Phonegap Link
Recently Phonegap
was renamed to Cordova
. So if it is mentioned as Cordova Based Application ,then it means a phonegap based application.The wiki will be updated soon.
最近Phonegap
更名为Cordova
. 所以如果它被称为基于 Cordova 的应用程序,那么它意味着一个基于 phonegap 的应用程序。维基将很快更新。
And here are some tutorials site Links
这里有一些教程网站链接
回答by Saroj Kumar ojha
First update the mac osx to 10.7.3, then download phonegap 1.5.0 is renamed as cordova, then try to create coredova app by following Template.
先更新mac osx到10.7.3,然后下载phonegap 1.5.0重命名为cordova,然后尝试按照模板创建coredova应用。