content top

iOS Tutorial: Advanced Networking with MKNetworkKit

Couple of weeks ago, I wrote a clean, fast networking toolkit for iOS and Mac written for the LLVM Compiler 3.0 with ARC. Reception was very good that it was the “most-watched” repository on Github last week. Early adopters have sent me innumerable emails on how fast their network operations are, and how responsive their app is after integrating MKNetworkKit. Contents Caching your responses, the wrong way Say hello...

Read More

iOS Code: MKiCloudSync – Sync your NSUserDefaults to iCloud with a single line of code

iOS Code: MKiCloudSync – Sync your NSUserDefaults to iCloud with a single line of code

Just wrote this class, MKiCloudSync (100 lines of code) that auto syncs your NSUserDefaults to iCloud. How to use? All you need to do is to enable iCloud key value store entitlements, copy the files and forget about the rest. Step 1: Enable iCloud entitlements for your app. This is easily done in Xcode 4.2.1 by opening your target settings and checking “Enable Entitlements” from the summary tab. This is illustrated...

Read More

Easy Debugging with NSMutableURLRequest

This post is a sequel to one of my previous post, Easy Debugging with ASIHTTPRequest. I previously showed you a code snippet for logging ASIHTTPRequest as curl commands on command line. I’ve updated that code for NSMutableURLRequest, which means, you can use it for almost any third party networking kits, including the recently famous AFNetworking. The Drive The main necessity for this was, I always used to miss some of the parameters...

Read More

iOS5: Migrating your code to NSJSONSerialization using the Adapter Design Pattern

In iOS 5, Apple introduced NSJSONSerialization, for parsing JSON strings. But, as on date, you might have already developed your app using a third party component like JSONKit or json-framework or TouchJSON and you might not want to migrate your complete code base to NSJSONSerialization. In fact removing or replacing an existing framework is not really an easy thing especially if you have a lot of dependencies. However, moving towards...

Read More

iOS Tutorial: Sending In App Tweets

iOS Tutorial: Sending In App Tweets

In iOS 5, Apple introduced tighter twitter integration with Twitter.framework and Accounts.framework. Most of the latest “social” apps out there use some kind of frameworks to send out tweets from their app. With iOS 5, you no longer need to build your code against all these frameworks. iOS 5’s built in Twitter.framework manages most of these issues automatically. In this tutorial, we will go through how to use the...

Read More

Easy Debugging with ASIHTTPRequest

Just wrote this quick and dirty method that dumps a ASIHTTPReqeust on console as a curl command. You can add it to your project as a category extension on ASIHTTPRequest or on a subclass (if you have one). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24   -(NSString*) description { __block NSMutableString *displayString = [NSMutableString stringWithFormat:@"\nRequest\n-------\ncurl -X %@",...

Read More
Page 3 of 912345...Last »
content top