Thursday, March 27, 2014

Setting PhoneGap server in your CF Builder and Creating a Sample Mobile Application

In my previous posts we have learned how to install Splendor Beta and install Thunder Beta and the creating Cert key for Android application development.

So, now we will see how we'll set up the key in Thunder (ColdFusion Builder) and how we'll create a sample mobile application.

  • Create one account in Phone Gap Server. ( https://build.phonegap.com/ )
  • Go to Windows -> Preferences -> ColdFusion -> PhoneGap. You will see a screen like below:


Server URI: URL of the PhoneGap server, use what I have wrote in the screenshot.
Email Address: Email address which you have registered during account creation.
Password: PhoneGap account password.

I mainly concentrated on android build only, so we only have to provide Android key details. 

.keystore file: Browse the key store file which you have created.
Title: Title you have provided during key creation
Alias: Alias name you have provided during key creation
Key Password: Key Password you have provided during key creation
Keystore Password: Keystore Password you have provided during key creation

Then click on Apply and Ok. We added our android key and setup the builder to generate android build.
  • Go to File -> New -> ColdFusion Mobile Project. Then you will see a new screen like below:

This window is for template selection, we are going to create a simple application so select blank template and click on Next. Then one new window will come like below:

 Provide the Project name and the location(Web Root) where this project will be created. Click on Next and you will get another screen.


In this window we will select server where our application will be linked, it will take default one but if you have more than one server configured in Thunder then you can select the server which you want. Then click on finish. 

Up to now we have created a project in ColdFusion Builder.
NOTE: Here my priority is to setup the mobile Application and create a build, so I'm using Ram Kulkarni's sample code. Ram is the developer who has developed this Mobile development feature in ColdFusion and it's better to refer his code. For more details you can visit his Blog: http://ramkulkarni.com/blog/creating-database-mobile-application-with-coldfusion-splendor/.
  • Right click on the ColdFusion Mobile Project and then Click on Generate PhoneGap Build.
  • Go to console of the ColdFusion Builder then you will see error messages for IOS build as we have not provide any key details for IOS and for android we will get a success message like below:

  • Go to PhoneGap Status tab and you will see the screen like below:

For iOS we got error and for Android there is a download link. It will take 2-3 mins or less for the download link to be visible so please wait for that. Now, click on download and give the path where to download and after few mins it will show a message that download completed.

So, if you will go that location you will see a .APK file. Move that file to your android device and now you install and run the application.

This post is for the first step towards mobile development. You can refer other materials for advance concept.

1 comment:

  1. http://www.oreillynet.com/pub/a/oreilly/web/news/coldfusion_0701.html

    ReplyDelete

Followers