Testing Cordova Hybrid Apps in Worklight

Recently I worked on a project that introduced me to IBM® Worklight® mobile application platform. Among other things, I was pleasantly surprised at the price tag of the Developer Edition of this product: it is free. The Developer Edition comes with an Eclipse-based IDE called the Worklight Studio which offers support for authoring the client-side of your mobile web, hybrid and native apps as well as developing server-side components called adapters.

The Worklight Studio comes with a web application called the Mobile Browser Simulator that can help you with developing and testing your hybrid applications created using Apache Cordova framework. The Mobile Browser Simulator offers you a suite of visual controls for simulating a variety of native bridge APIs to such native device capabilities as accelerometer, camera, compass, file system, device info, contacts database, etc., without the need to run your apps directly on mobile devices or their emulators (which would require setting up specific run-time environments, such as ADT Eclipse plug-in for Android, Xcode for iPhone, etc.)

Here is a screen-shot of the Mobile Browser Simulator that shows Cordova APIs’ visual controls/widgets on the left with the expanded Battery widget that helps simulate different battery levels and the battery plugged-in event (fired when the battery is plugged in for charging and stays in this state until un-plugged).
Worklight 6.0 Mobile Browser Simulator Screen

So, if you are interested in this approach to testing Cordova hybrid apps, below are a few simple steps to follow that will help you get up and running in no time.

Note: For this blog posting, I used Worklight ver. 6.0 which comes with Cordova framework ver. 2.6.
Continue reading “Testing Cordova Hybrid Apps in Worklight”

5 Beginning Tips for iOS

So you want to develop an iOS app? What do you need to know? This blog provides you with five useful tips for getting started.

iOS is the name of the operating system that runs in iPhone, iPod Touch, Apple TV, and iPad devices.  The OS is based on Mac OS X.  Both are built on the Darwin kernel, which is a UNIX like system.  It was originally called “iPhone running Mac OS X”.  The name changed to “iPhone OS” and finally to iOS.

Tip #1 – Buy a Mac

In order to develop iOS apps, you’ll need a Mac to do so1. Although there are some postings on the Internet that provide you with hacks for developing iOS applications on Windows, it’s advisable to purchase the real deal.

The most affordable Mac you can purchase is a Mac mini (starting at around $600). However, you may want to invest in a MacBook Pro (starting at about $1200), since it’s portable.

http://www.apple.com/mac/

Tip #2 – Download Xcode

The IDE that’s used for iOS development is called Xcode and is only available on the Mac.  It includes a code editor, a debugger, a user interface builder, a simulator, and performance tracing tools.  Xcode is also used for developing Mac OS applications.

To get a copy of Xcode, you’ll also need an Apple ID.  Download Xcode for free from the Mac App Store:

https://developer.apple.com/xcode/

Tip #3 – Learn Objective-C

Writing iOS applications requires that you learn a new language: Objective-C.  Objective-C is an object-oriented superset of ANSI C, developed by Brad Cox in 1980.  The syntax is very different from other object-oriented languages you may be used to, like C++ or Java.  For example, to define a method called setValues that accepts a String called n and an integer called id and returns nothing, you’d have to write the following code:

- (void) setValues: (char*) n id: (int) id {

   name = n;

   employeeId = id;

}

For a primer on Objective-C programming, see:

https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/

Tip #4 – Join the iOS Developer Program

iOS apps can only be distributed to the general public on the Apple App Store. In order to test your apps on an actual device, or publish your apps to the App Store, you’ll need to be a member of the iOS Developer Program, which costs $99/year. This membership is good for your entire team. That is, it’s not a per developer membership.

https://developer.apple.com/programs/ios/

There is also an iOS Developer Enterprise Program, which costs $299/year.  The advantage of this program over the iOS Developer Program is that you can distribute proprietary apps in-house instead of on the Apple App Store.  That is, they can be hosted on an internal web server and distributed wirelessly through a link contained inside an email/SMS message.

https://developer.apple.com/programs/ios/enterprise/

For a comparison of the membership programs, including a free iOS Developer University program, see:

https://developer.apple.com/programs/ios/university/

Tip #5 – Take an iOS Programming Course (Like Ours)

To really learn iOS Development, you’re best off taking an intensive course on the subject.  We offer a number of iOS development courses.  Please check them out:

iOS Development Training

 

1Technically, there are several Windows-based, third party solutions for iOS development, including game engines (e.g., Unity, Marmalade SDK), HTML/JavaScript solutions for hybrid application development (e.g., Appcelerator Titanium, Genuitec MobiOne Studio), Flash development (i.e., Flash Professional CS6), and general iPhone/iPad app creators (e.g., Dragonfire SDK). Unlike Xcode, most of these tools cost money.