I gave myself a personal goal around mid to late November; to finish an STO Android app with the dataset that Phil Casgrain had given me access to.  The app is now available on the Android market as STO on the Go though it’s almost impossible to find using the search.

I’m selling the app for $1.00 though there is a good chance it will be getting an increase in the next version, which will have at least maps and favourites features.

I’ve been working on a side project at Shopify recently and one of the things I had to take a converted JSON object and store it on disk as a cache. I’m typically working with NSArrays and other fancy things so I figured this is where I’d look for serializing that data into a plist on disk.

-(BOOL) saveArray:(NSArray*)itemsArray toLocationOnDisk:(NSString*)location
{
    BOOL saved = [itemsArray writeToFile:location atomically:YES];
    return saved;
}

Because I’m targetting iOS 5 I have this nifty new tool available, it’s NSJSONSerialization though there’s a bit of a caveat. The data that you get back from it isn’t actually objects of NSArray, NSDictionary although for all intents and purposes they behave like they are in your code.

There is another way to get around this though, what you can do is convert the array into an archived object like so.

-(BOOL) saveArray:(NSArray*)itemsArray toLocationOnDisk:(NSString*)location
{
    NSData *archivedItemsArray = [NSKeyedArchiver archivedDataWithRootObject:itemsArray];
    BOOL saved = [archivedItemsArray writeToFile:location atomically:YES];
    return saved;
}

Now all we need to do is re-convert that data into an NSArray, which is relatively straightforward.

// Deserialize the object back to an NSArray
-(NSArray*) getArrayFromDisk:(NSString*)location
{
    NSData *rawData = [NSData dataWithContentsOfFile:location];
    if(rawData == nil)
        // Assuming iOS 5 using ARC
        return [[NSArray alloc] init];
    return (NSArray*) [NSKeyedUnarchiver unarchiveObjectWithData:rawData];
}

Once you know about this, it’s pretty straightforward but trying to find answers on sites like StackOverflow for this kind of problem is a bit tricky since people often assume you are working with plain old NSArrays and such.

I recently discovered that although PhoneGap is pretty awesome, there are some things you should know before you go out and try to get it working on your melange of devices.

phonegap.js isn’t all that you expect it to be. That is to say, phonegap.js for an iPhone isn’t the same phonegap.js that is used on Android. So, if you are going to be dropping phonegap onto a bunch of different devices while testing, be sure that you are using the proper javascript file. Otherwise you will be stuck scratching your head wondering why the camera works on platform X but not platform Y.

They are hoping to get that taken care of in the future, but for the time being you’ll have to be sure that you are using the proper file.

I’ve released my first version of Bloggit: The dynamic blogging engine for hackers or something…

My main motivation for creating this tool was inspired by jekyll which I used for a bit in the past but found there were certain parts of it I didn’t like. Essentially the goal of this project is to have the application installed somewhere, then have a content directory that uses some kind of source control system such as git which it will pull from and update every hour or something. So when you write a blog post you save it in your local content directory, then push your commit to a public repository somewhere such as Github. There will be a bit of a delay between your push and when it gets published on the site but that can be customized via your CRON that would run.

The tool is extremely simple in concept, though still quite rough around the edges, especially in deployment. You can see it running at my Codenoodles site. The default templates and themes have support for mobile devices such as Android and iPhone.

All you need to start running your own Bloggit powered site is to have Flask and markup installed on your machine.

More details about it can be found on the wiki

I know this is old news, but I still see through my twitter feeds that people are still talking about this paid app pledge. I for one cannot stand the idea of spending 5 dollars every week for software, which after a certain point will be the trash apps that pollute what is the Android Market.If anything this makes Android developers look even more pathetic in the eyes of those developing for the “superior platform”.

Your software should have better reasons to get users to upgrade their software from the free Lite to the Pro version. These incentives should not simply be to remove the advertising from you apps! What else am I getting for that money I pay you besides having advertisements removed? Hell, charge me $3.00 and add a bunch of new features that make me want to upgrade. That one feature that makes your app good but not great without it. That is something I will pay for!

Some users complain about an application having advertising in it, which is typically in something free. Though from what I’ve noticed, most advertising is in the form of banner ads or in-list ads that I don’t even notice them or care. As such I’ve never let advertising in apps bother me one bit, I’m still using the free version of ChompSMS and don’t have any intentions of paying for it because the removal of advertising isn’t worth my money.

So, developers: make your apps rock and users will flock to them with wads of cash.

So, users: You control the market, so buy the apps that are worth the money.

I’ll do another post about developers cannot get the merchant _blessing_ and how we can try to make money through other means in the future.

© 2011 Christopher Saunders Suffusion theme by Sayontan Sinha