Automatic Network Activity Indicator with NSURLConnection

It’s very common to use networking APIs on mobile devices because of their nature. On iOS I’m sure every programmer is familiar with NSURLConnection and the network activity indicator, which we are suppose to show when we do networking, and managing it is a pain in the ass. Let’s correct this.
Continue reading

The truth about synchronous NSURLConnection

In this post, I’ll talk about NSURLConnection, the advantages and disadvantages about synchronous versus asynchronous connections. At the end I show a snippet of code on how to use an asynchronous NSURLConnection on a secondary thread into a concurrent NSOperation.
Continue reading

First step with NSRegularExpression

Regular expressions (regex) are often used because they are very practical, but there wasn’t native Cocoa API to simplify there usage, so programmers often used externals libraries like RegexKitLite.
Perhaps some of you read that applications that used this library would not longer be accepted on the App Store for some reasons, but yet I haven’t any problems with it, but who knows what Apple may decide.
So with the iOS 4 release, Apple introduce new class called NSRegularExpression which was exactly what programmers needed, I’ll show you in this post a very simple usage of it.
Continue reading