Archives for the ‘Tutorials’ Category

11 Aug 2014

Bluemix iOS Push Notifications Tutorial: Part 2 – Minimum Requirements

In this post, I’m going to quickly highlight a few requirements before we officially get going with the Bluemix iOS Push Notification Tutorial Series.

1. Mac OSX and Xcode

For those out there new to iOS Development, you cannot test and deploy iOS Applications to devices unless you do it via an Apple Operating System. While you can follow this tutorial using Mountain Lion (OSX 10.8), I’ll be using and recommend Mavericks (OSX 10.9).

Then, you will need to download Xcode. Xcode is Apple’s IDE for developing Mac and iOS Applications. The latest release of Xcode is 5, which is required for this Tutorial as we’ll be deploying an iOS7 Mobile App to test Push Notifications.

Both Mavericks and Xcode 5 are free to download and are available via the Mac App Store. Simply launch the App Store App from your Apple Operating System and search for “mavericks” and “xcode“. You will need an Apple ID to connect to the App Store.

Screen Shot 2014-08-11 at 5.52.58 PMScreen Shot 2014-08-11 at 5.53.13 PM

2. Apple Device and iOS

Unfortunately, you cannot test Push Notifications on an iOS Simulator, which would’ve been awesome. So, you’ll need an Apple Device like an iPhone, iPad or iPod Touch. I would recommend anything from an iPad 2 and up, or an iPhone 4 and up. This will allow us to deploy our app as an iOS7 Application.

So, as mentioned above, your Apple device will need to run iOS7. iOS7 is free from the App Store and definitely worth the upgrade if you haven’t done so yet. The reason I stress using iOS7 is because I haven’t had the opportunity to test the Bluemix SDKs on iOS6. I also don’t plan to as iOS8 is already around the corner.

3. Apple Developer Account

Screen Shot 2014-08-11 at 6.13.18 PM

This is sadly where some money comes in. You’ll need an Apple iOS Developer License, which goes for $99/year. Setting up the license is fairly straightforward, but could take a few days to be activated depending.

If you don’t have an Apple Developer Account as yet, but want one to follow with this tutorial series, I suggest you get it registered sooner rather than later. If we were only developing to test on an iOS Simulator, this wouldn’t be required, but because we need to test on an actual Apple Device, this is compulsory. You can either use your existing Apple ID or create a new one for the iOS Developer Account. It doesn’t matter really.

4. IBM Bluemix Account


We’re almost done. What we’re going to need next is an IBM Bluemix account. This is free and is quick to set up. If you already have an existing IBM Id, then great for you. You can log into Bluemix with that ID and you’re good to go. Alternatively, click here to sign up.


With everything above set up and configured, we are ready to start developing iOS Applications, deploy them to Apple Devices and integrating them with the Bluemix Cloud.

The most difficult of all of this is setting up the iOS Developer Program. I did mine years ago and back then it required some documentation, phonecalls, etc. I’m not sure if it’s that complicated still.

In the next tutorial, I’ll be moving to video Media. I’ll be showing you step by step how to set up the necessary Apple Certificates which we’ll need for deploying to an Apple device and sending Push Notifications.

If you find yourself getting stuck with any of the above-mentioned, leave a comment and I’ll try to assist you.

Till next time :)
3 Aug 2014

IBM Bluemix iOS Push Notifications Tutorial: Part 1 – Overview


This is a short video series that I’m planning for the very near future, on how to get the Bluemix Quickstart Push Sample Project running on your Apple devices.

Purpose of this Tutorial

While the Bluemix team do well to make these sample projects as easy to implement as possible and provide the supporting documentation and instructions, this process is quite daunting from my experience. My goal is to take you through the entire process from having very little already set up, to running the Sample Project and sending Push Notifications to your devices from the Bluemix Cloud.

Overview of Tutorial Series

The first phase of this Series will focus on iOS and will be mostly made up of short videos. Once i’ve properly tested the Sample Project for Android I will initiate the next phase.

This Series will be broken down into the following Chapters/Blog Posts:

  1. Minimum requirements for iOS Push Notification Sample Project
  2. Set up Push Notification Certificate and Provisioning Profile on Apple Dev Center (Video Tutorial)
  3. Set up and configure you IBM Bluemix Mobile Cloud Project (Video Tutorial)
  4. Set up and configure Apple Push Notification Certificate for your Mobile Cloud Project (Video Tutorial)
  5. Download and install Bluemix Quickstart Push Sample Project for iOS (Video Tutorial)
  6. Deploy and test Quickstart Push Sample Project as an iOS App on your device (Video Tutorial)

I’ll get the Chapter on minimum requirements out in the next few days and will take it from there.

Cheers for now.
3 Jun 2014

Appcelerator Tutorial: Install Modules globally for Titanium Studio

One of the great features of Appcelerator Titanium is how you can extend its capability by installing Mobile Modules. Examples of some of these modules are:

  • Ti.Paint (A module that allows you to draw on a canvas within your mobile app…e.g. a user adding a signature)
  • Barcode Scanner (Barcode scanning for your mobile application)

A great place to find many of these modules is the Appcelerator Marketplace. You can also find many other modules on Github as well.

The best news is that it’s become very easy to install a mobile module for your Titanium development environment.

Some key notes about this Tutorial

  • For a detailed reference on how to install modules, click here
  • We will use the In-App Billing Module for this exercise
  • I’m using Android for this example but the same applies to a module developed for iOS
  • Mobile Modules are dependent on the Titanium SDK you are currently using for your mobile app
  • Modules are usually downloaded as zip files

To install a mobile module, do the following

  • Download the In-App Billing Module for Android
  • In Titanium Studio, click on “Help\Install Mobile Module…”


  • Select the Zip file you downloaded
  • Keep the Output Location as “Titanium SDK” (Remember, we want the module to be available throughout Titanium Studio)
  • Click “OK


  • Once the module has been installed, restart Titanium Studio (Just to be sure)
  • Once restarted, navigate to one of your mobile projects
  • Open you mobile app’s tiapp.xml file
  • On the right in the “Modules” section, click on the green plus sign (+)
  • In the list of modules dialog, select ti.inappbilling and click “OK”
  • Save the tiapp.xml file


That’s it. The module has been successfully installed and is available for any of your mobile apps via Titanium Studio. In the near future I’ll provide tutorials on how to make use of some of these modules within your mobile applications.

Till next time, happy coding :)
15 Apr 2014

Install previous versions of iOS SDK in your current version of Xcode

In some cases, one might be developing for iOS6 and therefore require the iOS6.1 SDK. Xcode 5 however, no longer has the iOS6.1 SDK installed. In this article I’ll show you how to install the iOS6.1 SDK in your current version of Xcode.

Download Xcode 4.6.3 to get the iOS6.1 SDK and Simulator

  • Make sure Xcode is closed. If you are using Appcelerator Titanium, make sure that’s closed as well.
  • Go to Apple’s Developer Center
  • Log into iOS Dev Center (You will need an Apple Developer License for this)
  • Under Downloads, where it currently shows Xcode 5, Click on “Go to older versions of XCode
  • Let’s say you want the latest iOS6 SDK, that would be XCode 4.6.3. Search for it in the list and download the full Xcode package (about 1.6GB)


Install the iOS6.1 SDK and Simulator

  • Once downloaded, double click on the “xxx.dmg” file.
  • Right click on and select “Show Package Contents
  • Navigate to “Contents\Developer\Platforms“.

- When in the Platforms folder, to copy over the iOS 6.1 SDK:

  • In “iPhoneOS.platform\Developer\SDKs”, copy the folder “iPhoneOS6.1.sdk”.
  • In your Finder Window, go to “Applications”.
  • Right click on and select “Show Package Contents”
  • Navigate to “Contents\Developer\Platforms\iPhoneOS.platform\Developer\SDKs”.
  • Paste the “iPhoneOS6.1.sdk” folder.

- When in the Platforms folder, to copy over the iOS 6.1 Simulator:

  • In “iPhoneSimulator.platform\Developer\SDKs”, copy the folder “iPhoneSimulator6.1.sdk”.
  • In your Finder Window, go to “Applications”.
  • Right click on and select “Show Package Contents”
  • Navigate to “Contents\Developer\Platforms\iPhoneSimulator.platform\Developer\SDKs”.
  • Paste the “iPhoneSimulator6.1.sdk” folder.


That’s it. You can now use iOS6.1 SDK and Simulator as well as whatever current SDK and simulator you had installed.

Till next time, enjoy :)
26 Oct 2013

XPages Tip: Comparing a value in your XPages with backend data

I forget sometimes that many who have taken the path of XPages, are not necessarily existing Domino Developers who understand the Domino Object Model. This is a quick tip on how to take a field value from your XPages App, and compare it with data inside a Notes Database, and more specifically, a Notes View.

The Back-End Database

Let’s say you have a Notes Database with a view called “Fruits“. This view has 1 column called “Fruit Name” and is sorted in ascending order. Inside this view you have a few Notes Documents listed based on the following fruits captured:


The XPage

Next, you have a very simple XPage with a Text Field called “inputFruit“, where a user will enter a fruit name of their choosing. The XPage also has a button called “Submit” and calls the following Server Side JavaScript Function – checkFruits();


The JavaScript Function

Here we create a JavaScript Function called checkFruits(), which will use the value entered and check if it exists in the Notes Database:

function checkFruits(){
   //Set our variables
   var doc:NotesDocument = null;
   var view:NotesView = database.getView("Fruits"); //Get a Handle on the Database View
   var key = getComponent("inputFruits").getValue(); //Get the entered value
   //Check if fruit entered exists
   doc = view.getDocumentByKey(key, true) //The 2nd parameter 'true' means 'Exact Match'
   if(doc !== null){
      print("The Fruit Exists");
      print("No Fruits Founds");
   //A JS Function should always return something
   return true;
Hope this helps :)