简体   繁体   English

如何使用cordova 1.5和xcode 4.2创建“Hello World”iPhone应用程序?

[英]How to create a “Hello World” iPhone App with cordova 1.5 and xcode 4.2?

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. 我想使用Cordova1.5和xcode 4.2创建一个Hello World iPhone应用程序我在Xcode 4.2中安装了最新版本的phonegap(cordova1.5)。 How can I create a Helloworld app. 我怎样才能创建一个Helloworld应用程序。 Can anyone send me useful links for creating apps with cordova1.5 and xcode 4.2 ? 任何人都可以通过cordova1.5和xcode 4.2向我发送有用的链接来创建应用程序吗?

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 打开XCode并使用“基于Cordova的应用程序”模板创建一个新项目
  • Give project name and Un-select the "Use Automatic Reference Counting" 提供项目名称并取消选中“使用自动引用计数”
  • XCode will create a template project XCode将创建一个模板项目
  • Run the application first time and it will generate the additional /www folder in the project directory 首次运行应用程序,它将在项目目录中生成附加/ www文件夹
  • 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 选择项目并转到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" 重新运行,你应该看到警告对话框说“Cordova正在工作”

You can check the same tutorial with screenshot at here 您可以在此处查看带有屏幕截图的相同教程

Just Follow this link Phonegap Link 只需点击此链接Phonegap Link

Recently Phonegap was renamed to Cordova . 最近Phonegap更名为Cordova So if it is mentioned as Cordova Based Application ,then it means a phonegap based application.The wiki will be updated soon. 因此,如果它被提及为基于Cordova的应用程序,那么它意味着基于phonegap的应用程序。维基将很快更新。

And here are some tutorials site Links 这里有一些教程网站链接

首先将mac osx更新为10.7.3,然后下载phonegap 1.5.0重命名为cordova,然后尝试通过以下模板创建coredova应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM