Mobile Apps: Rapid Development

The target of this article is to take some of my best practices and process flow and form a recipe for building a mobile app with the least amount of effort going into plumbing and setup.

## Technologies, frameworks etc

My favourite stack consists of the following:

– OS X running on some solid hardware and a good connection to the interweb
– XCode with the latest iOS SDK
– NodeJS and various packages to do some of the heavy lifting
– Titanium CLI to compile
– Titanium Alloy Framework to seperate concerns a bit (helps with keeping sane)
– Sublime Text 2 with a couple plugins and themed to make me feel warm and fuzzy inside
– [iTerm2](http://www.iterm2.com/#/section/home) for a better terminal experience
– An [Apple Developer](http://developer.apple.com) account ($99/annum)
– An account with [Installr](http://installrapp.com) and/or [TestFlight](testflightapp.com)

## Prep

#### Install [XCode 5](https://developer.apple.com/xcode/downloads/)

#### If the app will target **Android**

– Download the [Android SDK Tools](http://developer.android.com/sdk/index.html), no need for the ADK bundle, just the SDK Tools. Unpack and move it to your preferred folder.
– Download and extract the [Android NDK](http://developer.android.com/sdk/ndk/index.html) and add the path to your .bash_profile
– [Create an Android Emulator](http://docs.appcelerator.com/titanium/3.0/#!/guide/Native_Android_Debugging_and_Testing_Tools-section-29004938_NativeAndroidDebuggingandTestingTools-Creatinganemulator)

#### Install NodeJS

Install with Node Version Manager (nvm)

Ensure nvm is on the path with

Install node stable

Copy the installed version of node to the /usr/local (where user installed global files should live on a linux VPS) and setting the permissions so that all users can access them.

#### Install Titanium CLI

Log in using your Appcelerator credentials

Install the latest released SDK

Configure CLI

#### Install [Alloy](http://docs.appcelerator.com/titanium/3.0/#!/guide/Alloy_Framework)

#### Install [Sublime Text 2](http://www.sublimetext.com/2)

Install the [package manager](https://sublime.wbond.net/installation#st2)

Some really helpful packages you can install:

– Emmet
– SublimeLinter
– SublimeCodeIntel
– Titanium Build
– Titanium API Document
– Theme – Spacegray

#### Install [TiNy](https://github.com/fokkezb/tn)

## Create the app

#### Write some awesome code

This is up to you.

#### Build and test

Easiest is to setup a new build system under Sublime’s Tools menu with the following:

and in this case save it as Ti Build iPhone or something matching your selection of CLI options.

Now Cmd+B will build and run the iOS simulator.

#### Deploy to some testers

You’ll need to provision the app for ad-hoc distribution at the [iOS Dev Center](https://developer.apple.com/devcenter/ios/index.action)

Install the .mobileprovision file by following the instructions and find the --pp-uuid by peeking in your ~/Library/MobileDevice/Provisioning Profiles folder and finding the filename of the newest .mobileprovision file.

Your --distribution-name will take the form "Name Surname (Team ID)" which can be found [in your Apple Developer account summary page](https://developer.apple.com/membercenter/index.action#accountSummary)

##### TiNy recipes

See a list of predefined recipes

Save your own

##### Clean

Clean up the build folder once in a while.

##### Ship for testers

##### Publish

Posted in Apps, Blog, Develop
Tweets