Google Android Development Agency SASS

Thursday 30 April 2009

A bit about me

Since I've had this blog for a little while now, without much background about me, I thought it might be worth sticking a post on to talk a bit about my background.

I've been working in software development for over 10 years, mostly based in and around Manchester and Cheshire.

I'm working these days as Senior Technical Architect at the Cheshire based agency SASS Digital.

I spend much of my time focusing on mobile development, notably iPhone development and Google Android development. We pioneered the Tub Thumper drum machine app on the Android platform, an app which was very successful and attracted interest from Google, HTC and T-Mobile. We're still working on Tub Thumper Pro, this will take advantage of the new audio API's of Android Cupcake so watch this space!

We've also recently been working on a top-secret audio app for the iPhone platform, I can't give away any details except to say that it's for a major client and once it's released should be awesome.

Prior to working here I was Technical Architect (amongst other things) at 3T Productions Ltd in Manchester, a sub-division of the mighty RM (Research Machines). I spent the best part of 10 years working at 3T, for huge clients such as the BBC, the DfES, Ofsted, Penguin Books and Harcourt publishing.

I gained a wealth of experience working in technologies such as ASP.NET and SQL Server and also with standards such as e-GIF and SCORM. Much of my work at 3T was e-learning based, an industry in which we broke new ground with every project.

In my spare time I play lots of guitar and record music, and spend a lot of time working on and driving rusty Citroens, such as my DS. There's a picture of my hotrod styled 2CV below.

My hotrod style 2CV

If you're interested, you can follow me on:

Twitter
Flickr

Enough about me anyway, back to the mobile development!

Showing the debug trace in Umbraco

Whilst developing with Umbraco, you'll quite often come across errors in UserControls where all you'll see is a big red box with not a lot of info as to what the error is and where it occurred.

It's easy to find this info when you know how; just add umbdebugshowtrace=true to your querystring and you'll see the debug stack trace, allowing you to locate the problem.

Friday 24 April 2009

Problems with Android 1.5 pre release

Just been trying the pre-release of Android 1.5 and hit a problem with one of the new features of the emulator.

With this version, you can create "Android Virtual Devices" (AVDs) which allow you to run multiple configurations of the emulator side-by-side without having to run long command line switches.

I'd created my new 1.5 AVD using

android create avd --name cc --target 3 --sdcard 16M --skin HVGA

but then trying to invoke (emulator @cc) it gave the error

could not locate a virtual device named 'cc'

If you run into this problem, you can diagnose what's wrong by running

emulator -debug avd_config -avd cc

Running this gave me a weird path problem, the emulator was trying to find the .ini file for my AVD in c:\Users\Andy\ instead of e:\andy\. (I'm on Vista and my profile is on drive e:\).

To fix this, all I had to do was create a new environment variable ANDROID_SDK_HOME and point this at the moved profile directory. Restarted the command line so that it would register the variable and all was well.

Now for some Cupcake fun!

Tuesday 21 April 2009

Using % symbols in NSStrings

Normally, when you use the '%' symbol in an NSString, it's because you want to use a formatter to format some other variable and insert it into the results string.

For example

NSString *myString = [[NSString alloc] initWithFormat:@"Number : %d",5];

Would yield the string "Number : 5".

However, we've had a few cases where we need to output a percentage in a string, e.g. "50%". I spent a few minutes searching for complicated solutions, before it dawned on me that all you need to do is escape the % sign, thus telling the compiler that you don't want to invoke a formatter:

NSString *myStrWithPercent = [[NSString alloc] initWithFormat:@"%@%%",myNumber];

Yields "50%". The % sign escapes the second %. Simples!

Wednesday 1 April 2009

Problems with iPhone Ad-hoc Provisioning

We recently had a problem here at SASS Digital whereby an app we currently have in development for the iPhone would not install on a handset, despite the correct provisioning profiles being in place.

To put this into context, we had created an ad-hoc provisioning profile, signed by myself (as Team Leader) and associated this with the UUID of the handset in question. The provisioning profile had been successfully installed on the handset (showing as verified in the Profiles area of the phone) but when we tried to sync the app we got the fateful error:

application could not be verified

The solution, it turns out, was simple:


  1. In xCode, create a new file, choosing "iPhone OS -> Code Signing -> Entitlements" as the type

  2. Call the new file "entitlements.plist" and then open it in xCode

  3. You will see that this file has only one option; get-task-allow. Make sure that this is not checked.

  4. Now, make sure you have your chosen target selected, and click Edit Active Target

  5. In the "Code Signing Entitlements" field, enter "entitlements.plist"

  6. Save everything, clean the build and compile



This solved the problem for us, our app installed on the phone using our pre-installed provisioning profile. Praise Jebus!