Being a newbie to phonegap development I have question for which i have not been able to find the answer yet. I have developed an using Xcode and phonegap. I used the IOS simulator and my iphone as a test device. After getting the development certificate, I could install the app using Xcode on my phone to test the app. I also submitted the app to the app store via Xcode.
I obviously want to deploy my app on other platforms like the android and windows. I know I can submit the app to phonegap build and it returns me all the executable files for different platforms.
But, instead of developing the app for IOS, if I had developed the app for android, I assume that phonegap build will give me a .ipa file.
How can I submit the app developed for android using phonegap submitted to the apple store for distribution.
Thanks for your help in advance.
Great question. I think the heart of this question lies at the differences between PhoneGap and Cordova. Cordova is sometimes thought of as the Open Source version of PhoneGap, but in reality, Cordova is the Open Source core of PhoneGap.
What does this have to do with PhoneGap Build? I'm getting there. When Adobe wanted to Open Source PhoneGap, they wanted to keep the branding for a few value added features that they could monetize. The Apache foundation had them rebrand the open source version, which is now known as Cordova, and Adobe retained the rights to use PhoneGap for their value added features, one of which is PhoneGap build. The PhoneGap Build FAQ might be useful info.
But, instead of developing the app for IOS, if I had developed the app for android, I assume that phonegap build will give me a .ipa file.
Actually, no. When you're developing with XCode for iOS, XCode itself produces the .ipa based on the Cordova (PhoneGap) template project. If you were to build for Android for instance, you would produce a .apk, which is, more or less, the Android equivalent of a .ipa. If you were to develop for Windows phone, you would produce a .xap file. The one problem with you doing this yourself is that you would need to have a template project for each of the different ecosystems that you then set the configuration, and add your resources to the www folder (or equivalent). This could be tedious, and a little time consuming. To make this process a little easier for developers, in comes PhoneGap Build, designed to take care of this step for you. You give them your universal PhoneGap app, based on your HTML, CSS and JavaScript (and possibly a little money, depending on your price plan), and they return you the signed apps, ready to be submitted. Awesome!
So in reality, there is nothing in PhoneGap Build that you couldn't do yourself (given enough time and effort), but they just make it easier for you to focus on the important thing, solving your original problems, and not spending time dealing with builds.
So to answer your final question, you have two choices: Use PhoneGap build to have it generate (pretty much) everything you need for both Android and iOS (As well as others), or set up new Template Projects for each, and drop in your resources in the associated www folder, and build it yourself. Check out the PhoneGap Download and the projects for the different platforms.
If you have any questions, comment on this answer, and I'll try to update as needed.
Update 1
Yes, PhoneGap Build provides app-store ready builds (See second advantage).
Get app-store ready apps without the headache of maintaining native SDKs. We do the work for you in the cloud and your app will always be built with the most up-to-date SDK for the platform you are targeting.
Related
I am using PhoneGap and Framework7 (UI) for my app. The app will be deployed on IOS, Android and Windows.
The app needs to play audio and also record audio. I will be using alot of javascript code for checking user answers and adding user scores.
My problem.
I looked at a few tutorials and examples. I am really confused.
I am using the latest version of PhoneGap. I am using PhoneGap Desktop to create a new project. I also downloaded the PhoneGap app to run it on my device. (All working)
My confusion.
I see in some tutorials it says this.
In order to create a PhoneGap project for Android, all you have to do
is run the command to add a platform to the project: $ phonegap platform add android
Do I need to add this too? I have created a build for the android version using PhoneGap Build (www.build.phonegap.com)
Do I have to change my app structure to accommidate both IOS and Android?
Is there a way to build for IOS on PhoneGap build without a certificate/key from Apple? I just want to test the app and see if its working on IOS. I am still in the beginning stage of development.
Thanks in advance
The PhoneGap Desktop / Developer app combination, while great, is not a perfect representation of how your app will behave when built and installed on its own. You will need to do further testing to ensure your app works as expected.
The templates usually come with all the core plugins installed. These will ask for far more permissions than your app actually needs. You'll need to remove these from config.xml at some point prior to production.
config.xml is the preferred mechanism now for indicating which platforms and plugins are required by your app. Any missing platform or plugin will be automatically installed by any of the build tools (CLI or PhoneGap Build). See the Cordova documentation and PhoneGap Build documentation for more information.
PhoneGap Build determines which platforms you want to build for by looking for <platform name="..."> tags in your config.xml file. If you have none, all platforms are built, but at some point you'll need to limit this to the platforms you intend to target.
Note: IF you have the CLI installed, you can add platforms and save them in your config.xml by using cordova platform add --save android.
The same applies to plugins. Note that the PhoneGap Developer app only supports core plugins and a few third-party plugins.
You do not usually need to change your project structure to support iOS and Android. You may need to handle quirks that are present on each OS, but you should be able to do so using the same code base.
You cannot build an app on PhoneGap Build for iOS without having the requisite certificate and provisioning profile from Apple.
I am trying to get started with phonegap/cordova for developing mobile apps.
Still a lil confused by the getting started part of the website
http://docs.phonegap.com/
In one place,CLI installation instructions, they say to install cordova.
IN another place,Phonegap installation instructions, they say to install phonegap.
What's going on here? Do we need both? What is the difference in roles of each one?
PhoneGap is a distribution of Apache Cordova. You can think of Apache Cordova as the engine that powers PhoneGap, similar to how WebKit is the engine that powers Chrome or Safari. (Browser geeks, please allow me the affordance of this analogy and I’ll buy you a beer later.)
Over time, the PhoneGap distribution may contain additional tools that tie into other Adobe services, which would not be appropriate for an Apache project. For example, PhoneGap Build and Adobe Shadow together make a whole lot of strategic sense. PhoneGap will always remain free, open source software and will always be a free distribution of Apache Cordova.
Currently, the only difference is in the name of the download package and will remain so for some time.
more
The PhoneGap CLI is built on top of the Cordova CLI. It has all of the functionality that the Cordova CLI has. The main difference is that the PhoneGap CLI has PhoneGap Build integration. So if you don’t have the native SDK installed, you can delegate compilation to the PhoneGap Build cloud service and get app-store ready mobile apps. Both tools are completely interoperable.
No, you don't. PhoneGap should include all of the commands that Cordova provides. It provides a cloud-based build feature, which Cordova does not.
The documentation on phonegap.com would benefit from clarifying its use of 'cordova' vs. 'phonegap'. Right now, it is too easy for new developers to get confused over which commands are relevant.
I would like to use PhoneGap - Cordova for developing HTML5 + javascript application that will display sensor data on both win8 and android.
I have a basic question which I didn't understand from my research in the web.
what is the structure of such application? I mean, how to build this cross platform application in one project only?
what I see in phone gap - getting started guide http://docs.phonegap.com/en/2.5.0/guide_getting-started_index.md.html#Getting%20Started%20Guides
and many other websites, is that the working mode is to open a project, for example in VS2012, for OS specific. but I want to use this project for win8 and android!
I'll appreciate any help, especially if you have code samples for it and maybe some useful tools\templates to open this project.
note: I'm new to HTML5-javascript.
gin,
the structure is you would be coding using jQuery,java script,CSS,resources and your basic HTML.
The HTML API and the CORDOVA's java script will integrate with the native plugins of Phonegap.
We can create our own plugin's,we have a format for it there in the same website.
You need to create different projects for each platform if you decide to build the app locally. For example, you need to create an Xcode project in a Mac machine to develop an iOS app. If you are ok to do cloud build, you can check out http://build.phonegap.com where you just need to upload your zipped html/js and css files and it will give u ready to run apps for iOS, Android, Windows mobile, BB etc...
Say I'm a windows dev, familiar with Visual Studio and with a need of developing an Andriod app. I looked at both the andriod and wp7 getting started guides, but found the windows phone version http://phonegap.com/start/#wp guide much simpler than the Android version (of course, as a windows dev I have already everything installed).
Then comes my question:
Could I develop my app using the Windows Phone environment, and then use the PhoneGap Build services to get the Android version build?
In case, what should I upload to the build service?
Sorry if I got this all wrong, and thanks for any help!
Larsi
The whole idea of phonegap is to develop a multi platform app writing the code once.
So the answer is yes, you should be able to build the app for wp, and then re-use your code for all the other platforms, only if you onlyuse the phonegap API and do all your programming in JS, HTML and CSS.
About what you should upload, I haven't doned it myself, but I think that It would have to be all the JS, HTML and CSS from your app. In android all is located on a folder called "assets".
Good Luck!
just wanted to clear a confusion concerning phonegap,
My area of interest is mainly Android and Iphone. What I really understand about phonegap is that the phonegap app is platform independant when no native libs are ysed and thus run both on iphone and android. Thus if i build an android app on eclipse using phonegap without using any native libs, will it run on iphone as well??
Nope, this is not exactly the case.
Phonegap enables you to write cross-platform code (HTML, JS, CSS), but when it comes to building, you have to compile this code to a specific environment for each OS. For example you can build the Android version using eclipse, and the iOS version using Xcode.
Hope this helps!
No, you will still need to build for iPhone as well.
You can use the same source code for all systems.