Matt Gemmell

My new book CHANGER is out now!

An action-thriller novel — book 1 in the KESTREL series.

★★★★★ — Amazon

MGTwitterEngine important update

development & source 2 min read

To all those using my MGTwitterEngine code on either Mac OS X or iPhone OS, please update your code from the Subversion repository. Please note that you should always be using the repository; I’m not making any effort to keep static zip-files of the code up to date. If you don’t know how to get code from the repository, see the notes at the end of this post.

This version brings a few improvements and some fixes, as detailed below.

  • On August 1st, Twitter pushed out an update to the Twitter API to correct a security flaw in the service. This update was released with just 2 hours' notice, and I've only now had a chance to make the corresponding updates in MGTwitterEngine. If you were getting HTTP 400 errors when using MGTwitterEngine to follow/unfollow people, set favorite tweets, delete tweets or direct messages, and a few other things, this new version fixes the issue. No code-changes on your part will be necessary.
  • Significantly, MGTwitterEngine now incorporates the various improvements from the Iconfactory's Twitterrific client for iPhone (which uses MGTwitterEngine). One major improvement is that you can now optionally use LibXML instead of NSXMLParser (on either Mac OS or iPhone) for better XML-parsing performance. See the included README file for more information on that (notably you'll have to add a path to your project's Header Search Paths to avoid compilation errors).
  • We now support a new method to test whether a given user receives updates from a given other user (i.e. if user1 is "friends with" user2). The new method is -isUser:receivingUpdatesFor:.
  • We now support the new parameters in the methods to retrieve either friends or user timelines. Namely, you can now specify a starting page-number and/or a number of tweets to retrieve for either method, and you can also specify either an optional starting date or a specific starting tweet-ID. This will be useful for Twitter clients which maintain state (as yours should).

Many thanks to Craig Hockenberry (chockenberry on Twitter) for his great work on Twitterrific and for contributing his improvements back into the codebase for everyone’s benefit - even his competitors!

We both hope you’ll enjoy this new version of MGTwitterEngine on Mac OS X and iPhone.

How to get code from the Subversion repository

Just launch the Terminal application (it's in /Applications/Utilities), paste the following command into the window (all on one line) and then press Return: svn checkout http://svn.cocoasourcecode.com/MGTwitterEngine ~/Desktop/MGTwitterEngine That command will checkout the latest copy of the source into a folder on your Desktop called "MGTwitterEngine". The actual name of the folder is up to you, and you can then move that folder anywhere you like. Whenever you want to update to the latest version of the code thereafter, launch the Terminal application again and use the commands below. Note that there are two commands, and that they should be pasted into Terminal one at a time, pressing Return after each. Also note that you should obviously change the first command to use the actual path to wherever you're keeping the code. cd ~/Desktop/MGTwitterEngine svn update If you want to find out more about Subversion, you can read the free online Subversion book.