I have installed PhoneGap in my mac and I am able to select PhoneGap project template using Xcode. Now I my doubt is, how can I deploy the application on Android device?
Do I need to set up Eclipse and need to install PhoneGap Sdk again?
Can't I develop it on one platform and get the build for other mobile devices?
Yes you need to configure cordova on seperate platforms if you download the libraries.
Although you can use https://build.phonegap.com/
To just write code once and you will get the respective installable files for the mobile platforms.
I agree with above answer. But if you keep developing apps using Phongap you better you Install ecplipse and sdk. Then add following plugin
http://www.mobiledevelopersolutions.com/
It will generate you entire set up for application. You need to replace www folder.
Make your you also replace correct cordova js file. Because it needs to be the one created for Android.
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 want to convert my app into a hybrid app using phonegap build.
How do I do that?
I see different setups in basically every tutorial.
In this one, there is not a single platform folder, just the usual img/css folders, plus the config.xml
In many other tutorials I see a folder structure like www, platforms, etc. with the andorid and ios platform code.
How do I setup my phonegap project??? Do I need the platform, do I not need the platform, do I need the cordova.js, do I not need it??
It seems information about this is somewhat contradictory and often outdated.
E. g. I created my app using these steps.
Which does create all those folders like www and platform, however, the app doesnt install correctly after I built it with phonegap build. So something must be configured wrongly... I mean, it's there OWN site and it fails!
What is the correct folder structure that I need to convert my app into a hybrid app that will run on iOS, android and windows phone, using phonegap build?
It depends on whether you plan to use PhoneGap to develop or only to compile (Phonegap Build).
I will show how I used until a little time ago.
I used to develop an Ionic project and made all the development with it. When I needed to test something on the phone, I was using the Phonegap Build.
Both projects have the folder "www". To use Phonegap Build site, I was replacing the folder "www" of Phonegap project with the "www" folder of Ionic project. Then just send the Phonegap project ZIP to Phonegap Build site. This always worked for me.
After creating the project (phonegap create my-app), basically you do the project at "www" folder and configures preferences in config.xml (fullscreen, plashScreen, android-minSdkVersion, etc).
If you use Phonegap Build site you donĀ“t need to add platforms (platform phonegap add) and not need to run "phonegap run android"
PhoneGap Build's only requirement for your application structure is that the config.xml and index.html is in the top level of your application.
Make test:
- phonegap create my-app
- configure config.xml (If necessary, not required)
- config.xml and index.html in the same folder (preferably in www)
- ZIP
- Upload ZIP on Phonegap Build
I am developing currently for IOS and Android SDK. So each time i have to do an app i have to develop for 2 separate platforms which take much time. Also i am planning to develop on BB , Windows Mobile etc. I came across Phonegap and i had some questions.
First suppose i am developing on MAC OS and Xcode 4 and i have install the required SDK for phonegap i create a project using the template and start coding in HTML5/CSS3. Once the project is completed how to import it to Android platform? Should i start to create a project and adding phonegap libraries and required jar and right away i can copy paste the HTML5/CSS3 from the www folder scripts into the required directory /assets/www ? If that's the way it suppose to do then i will have to do the same for BB and Windows (of course on a Windows machine) we can do the same?
Many thanks.
build.phonegap.com will build all the needed apps from your web content.
I have developed one simple application in phone-gap-android using eclipse and android SDK.
As phone-gap support multi mobile platform , I want to run this application in iPhone also.
How can i achieve it ?
For each platform you want to get a port, you need to create a project in the dedicated environment and compile application as native one for each.
Your created source should be shared between project.
Then for example :
to port your application to iPhone, you need a mac with installed Xcode, iPhone SDK downloaded and phonegap one installed.
In xcode, create a phonegap project, import your sources, compile it, and it works !
Instructions on how to set up Phonegap for each OS can be found here: http://phonegap.com/start
If you are lucky, major modifications will not be needed between the devices.
An alternative would be to try PhoneGap Build: https://build.phonegap.com/
Today i wrote a simple PhoneGap app on Eclipse.And I became interested, is it posible to write one App on Java and all other platform versions to by generated automaticly,or for every platform I must create dev enviromnent and create a separate app .
Regards.
PhoneGap Build takes the files you include in the WWW folder in a PhoneGap project and then builds apps for multiple paltforms so you don't need to have a build environment for each platform you wish to target. iOS is a special case though.