Swift Rush

Incidentally, yesterday I reconverted myself as an iPhone user once again. Just in time for Apple WWDC. I thought I was gonne be one of those late buyers who’ll regret what they just bought when not very long, a “better” phone/hardware introduced. On the contrary, this was my most “on time” purchase of an iPhone ever. These couple of years, I’ve limit myself from coding in iOS. I genuinely don’t like Objective-C just like I don’t like Ruby. [Read More]

HMAC-SHA1 Base64 Result With Objective-C

A few days of hard done nights were all inspired by faulty encodings. Talk about “Hello World” experiences LOL. Keeping things in mind, to really smooth things up between Objective-C and PHP, in any Objective-C functions needing to encode/decode strings like PHP, here’s the encoding type: NSASCIIStringEncoding Do not interchange this with any other or things will go wrong :( Here are snippets to generate HMAC-SHA1 hashes in its Base64 form encoded correctly for OAUTH v1. [Read More]

URLEncode With Objective C - The OAUTH Way

Coming from a PHP background, we should all be thankful to rawurlencode() from PHP! Here’s an Objective C version with OAUTH v1.0a requirements.

- (NSString *)urlencode:(NSString *)text {
    NSString *temp = @"";

    for(int i=0, max=[text length]; i=0x30 && b<=0x39) ||
           (b>=0x41 && b<=0x5A) ||
           (b>=0x61 && b<=0x7A)
            ) {
            temp = [temp stringByAppendingFormat:@"%c", t];
        } else {
            temp = [temp stringByAppendingString:@"%"];
            if (b <= 0xf) temp = [temp stringByAppendingString:@"0"];
            temp = [NSString stringWithFormat:@"%@%X", temp, b];
        }
    }
    
    return temp;
}

OAUTHnesia Client for Objective-C

Okay for the last few hours, I’ve been learning how to code in Objective-C and the first result is an OAUTH client for Urbanesia. I haven’t tested thoroughly though. The class basically wraps POST & GET requests to Urbanesia with OAUTH requirements. Instantiating the class, you will have to provide Consumer Key & Secret obtained from Urbanesia. The current implementation requires User Key & Secret for every requests too. Future release of OAUTHnesia will include non Use Key/Secret methods and XAUTH. [Read More]

Mobile Trends - Looking Back 1 Year

I’m still fairly new to mobile development, just a little over a year. As I dig deeper, it just gets more and more interesting. This won’t be a technical writing like a tutorial but more to how the development scene has been evolving for the past 1 year. Putting it simple: Trends. I started my mobile development efforts with Blackberry. Against all odds, I installed the SDK on a Windows virtual machine using Parallels Desktop. [Read More]