So we’ve been working on an iOS app, that makes use of awesome power of Azure coupled with the ability to write an app that works truly offline and syncs when a network connection is available.
I am just going through App Store approval. I will give an update as soon as I know the outcome.
A couple of other bits of advice about getting Sync. Framework applications up onto Azure.
Azure now supports new startup commands. This makes it way easier to install the necessary managed and unmanaged dll’s you need.
Based on yesterdays post, I then followed -
http://social.msdn.microsoft.com/Forums/ar/synclab/thread/c2a9dc29-e1cc-4dc8-a6c9-0f57fab98d58
The other thing I just found out, is that you get GDI+ errors if you try and save a bitmap to a stream as a PNG on Azure. Use JPEG’s instead…
So in the process of going live on a mobile solution that uses Microsoft Sync. Framework, on Azure.
I came across this really useful guide on how to package up the various elements of the Sync. Framework to get it running on the Azure servers.
http://msdn.microsoft.com/en-us/library/ff928660(v=sql.110).aspx
If you follow it to the letter, you’ll be up and running in no time.
This is very cool
Just found this fab, tool to generate all the insert statements you need from a SQL database.
If you have SQL Server 2008 R2 Installed -
Run
"C:\Program Files (x86)\Microsoft SQL Server\90\Tools\Publishing\1.4\SqlPubWiz.exe"

This lets you select individual tables, views, stored procedures and script out both data and schema structures.
Perfect for populating SQL Azure, when migrating from on-Premise databases.

So, I wanted to build a simple display for the foyer of our building that would display in real-time the zeitgeist of the nation. What better way of testing the pulse of the UK, than pulling down the latest list of Twitter Trends.
Twitter exposes this as a nice bit of JSON XML
If you call - http://api.twitter.com/1/trends.json
You get a nice JSON response explained fully here
https://dev.twitter.com/docs/api/1/get/trends/current
.Net 4.0 has a great JSON deseriliser that can quickly read inbound JSON and turn into nicely populated .net classes.
My base class to represent the data from my feed looks like -
using System.Runtime.Serialization;
namespace Trends
{
[DataContract]
public class OurTrend
{
[DataMember(Name = "trends")]
public List<Trend> trends { get; set; }
[DataMember(Name = "as_of")]
public string AtDate {get;set;}
}
}
Each trending topic is then held in a ‘Trend’ class which looks like -
using System.Runtime.Serialization;
using System.Runtime.Serialization;
namespace Trends
{
[DataContract]
public class Trend
{
[DataMember(Name = "url")]
public string Url { get; set; }
[DataMember(Name = "name")]
public string Name { get; set; }
}
}
Note the DataContract and DataMember tags, are what instructs the deserialization of the JSON.
Using the magic of System.Runtime.Serialization.Json you can read contents straight into .Net.
Like -
string response = "{\"trends\":[{\ ....
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(OurTrend));
byte[] inbytes = Encoding.UTF8.GetBytes(response);
MemoryStream ms = new MemoryStream(inbytes);
ms.Position = 0;
OurTrend data = (OurTrend)serializer.ReadObject(ms);
ms.Dispose();
Contact Me, via my blog if you would like a copy of the full source.

I recently purchased an Otterbox Defender case for iPhone 4. It does the job as intended, protecting your phone from knocks and dust. Great bit of kit, making you’re iPhone look a little like a mid 80’s Walkman
.
The biggest issue, is that Otterbox don’t make a car-phone holder for it. Having broken my 5th universal in air-vent phone holder I wanted to get something decent for phone+Otterbox comibination.
Googling the issue of Otterbox and Car mounts didn’t prove to fruitful. So I took matters into my own hand and made one.
So I purchased ‘yet another’ air vent holder, but this one came at least with a windscreen mount bracket.
I opted for this one, from Tesco.

For £6.95, link here - http://direct.tesco.com/product/images/?R=100-8959
The Otterbox comes with a belt clip. I Intended to use this as it snaps tightly onto the phone, and didn’t mind breaking the clip in the process, to be frank belt-clips for phones is not a good look. Using pliers, I pulled out the metal spring. Then levering the belt clip off, left me with just the phone holder bit.
This gave me the perfect base to just glue to the stem of the Tesco car holder. Using super glue, I managed to get a pretty tight connection with the advantage that the Tesco mount allows for rotation.
Final product -

Back of the bracket.

Fitted -

I’ve just driven 400 miles with it, it works great in both portrait or landscape. The phone snaps in with a reassuring click. On the road, their seems to be no vibration. Given the build quality of the Otterbox, this seems a really robust solution. Not bad for Otterbox case+£6.95 and about 20 minutes work.
Tonight, I took a Tesco car-phone universal holder and bonded it to the belt clip of an iPhone Otterbox Defender case. Results 2 follow.
Pleased to announce that my 6th App. has just gone live on the Apple AppStore
http://itunes.apple.com/app/the-fillers-the-killers-tribute/id427958386?mt=8
Now this might be sacrilege to some, and a blessing to others.
Through using Objective C, I realise that I really miss the ability to do C# quick and easy string manipulation, like -
IndexOf
Trim
Replace
Substring
Split
etc.
For my own sake, I’ve begun working on some functional equivalents.
So far I’ve got
- (NSInteger) LastIndexOf:(NSString *)searchstring;
- (NSInteger) LastIndexOfI:(NSString *)searchstring;
- (NSInteger) IndexOf:(NSString *)searchstring;
- (NSInteger) IndexOfI:(NSString *)searchstring;
- (NSString *) PadLeft:(NSInteger)totallength;
- (NSString *) PadRight:(NSInteger)totallength;
- (NSString *) Remove:(NSString *)what;
- (NSString *) RemoveI:(NSString *)what;
- (NSString *) Replace:(NSString *)what with:(NSString *)with;
- (NSString *) ReplaceI:(NSString *)what with:(NSString *)with;
- (NSString *) SubString:(NSInteger)start;
- (NSString *) SubString:(NSInteger)start length:(NSInteger)length;
- (NSString *) Trim;
- (NSString *) LTrim;
- (NSString *) RTrim;
- (NSArray *) Split:(NSString *)
Full source available here -
Or if link doesn't work Click Contact Me, and I'll send you a copy
So, I’ve just completed my 5th commercial iPhone App.
Always when I move to a new programming language I take a test application and port it to learn. So my equivalent of “Hello World” app. is -

I built this, as an app about a year ago, but figured that it worked so well on iOS that I would get it published.