A selection of useful repositories on GitHub

    Recently, I have gathered a lot of marked repositories on GitHub with all sorts of different, useful and not very pieces of code. I decided to structure them for myself, and to share with the public.

    facebook / three20

    A very well-known library with different functionality for the iPhone. Used in the official Facebook application. Previously having some problems with the private API, Three20 now passes validation in the AppStore without any problems. The library is very powerful, and because of this, it is somewhat complicated in the initial study. There are many kinds of helper macros, starting from working with memory and ending with advanced logging.

    The kit also includes interfaces for working with images (TTPhotoViewController is equivalent to the photo browser from the standard Photos), letters (fully extensible UI for sending mail). The TTTableViewController advanced table controller is specifically designed to receive data from the network. TTTextEditor is a great control that allows you to enter text into a dynamically expandable UITextView, just like SMS does.

    In addition to the UI, there are several useful classes at the Foundation level, for example TTURLRequest allows you to cache requests on disk (something that cannot be done on the Foundation using the Foundation). There is still a very interesting but slightly difficult to understand TTNavigator, which allows you to make a flexible navigation system inside the application. In fact, Three20 deserves a separate article on this.

    pokeb / asi-http-request

    Wrapper for CFNetwork, which allows you to make advanced HTTP requests. From the useful moments: allows you to upload data directly to a file; supports a simple interface for transferring files in a POST request; there is support for delegates to update download progress; support for various authorization schemes (Basic, Digest, NTLM); GZip support for both answering and sending requests.

    In addition to all this, ASI HTTP can work with Amazon S3, and from the advanced features, it supports downloading shaping and work through a proxy. ASI HTTP feels great on both Mac OS X and iPhone.

    parmanoir / jscocoa

    A really cool thing is essentially Javascript to Cocoa bridging. It works on the basis of webkit JavascriptCore, and provides more features than standard bridging.

    The library allows not only creating new classes in JS runtime, but also performing swizzling (method substitution) of existing classes, as well as standard JS methods on ObjC objects (I especially like the example with regulars from the documentation:) myNSString.match(/pattern/). Using JSCocoa, you can very easily add scripting and plug-in support to any of your applications (just do not forget that for scripting support in iPhone applications you can potentially get rejection).

    andrep / RMModelObject

    Have you read the guide to implementing model objects in Objective-C? If so, then you imagine the amount of work needed to create a full-fledged model class, and Core Data is not a silver bullet ©. RMModelObject does more of the implementation for you. In essence, the description of the model instance comes down to the following code:

    @interface MyBlogEntry: RMModelObject
    @property (copy) NSString * title;
    @property (copy) NSCalendarDate * postedDate;
    @property (copy) NSAttributedString * bodyText;
    @property (copy) NSArray * tagNames;
    @property (copy) NSArray * categoryNames;
    @property BOOL isDraft;
    @implementation MyBlogEntry
    @dynamic title, postedDate, bodyText, tagNames, categoryNames, isDraft;

    No need to explicitly declare ivars. No need to describe accessors. Ready-made support for both NSCopying and NSCoding. Ready-made support for comparing objects (-isEqual: and -hash) according to specified comparison criteria. Ready -dealloc. Wonderful thing, in a word. And also such classes will receive notifications (a la simplified KVO) when any field of the model is changed, which allows for both validation and instant saving. Of course, all this is very friendly with other Cocoa technologies, for example with binders.

    RMModelObject inside is a very interesting engineering solution, if you are interested in digging in runtime - I advise you to read the source.

    erica / *

    Erica Sadund is a well-known programmer and a great writer. In her repository, you can find several useful categories for everyday work. NSObject extensions allow you to make several interesting options for calling selectors (for example - (id) objectByPerformingSelectorWithArguments: (SEL) selector, ...;), and to access information from runtime.

    Extensions for NSArray allow you to make selections traditionally used for set: uniqueMembers, unionWithArray :, intersectionWithArray :; map, collect, reject operations on the given selector and arguments, as well as extensions for working with NSArray as with a stack or queue.

    NSDate-ExtensionsAdds methods to NSDate to quickly create a date, check for today, yesterday, tomorrow, this week, etc. and simply parsing NSDate into components without involving a calendar class.

    I advise you to also look into other Erica repositories.

    guicocoa / gccalendar

    GCCalendar is a class for creating a calendar interface. GCCalendar only supports the one-day view, but it does it very well.

    uliwitness / UliPhoneKit

    Allows in two lines to play a given sound on the iPhone. Invaluable for quickly adding sound indications to the project, but nothing else can.

    enormego / EGOTableViewPullRefresh

    Once the approach to updating with Tweetie by dragging and dropping UITableView down has already spread across different applications and has become a completely standard pattern for interacting with the iPhone. EGOTableViewPullRefresh will help you quickly and easily achieve similar functionality in your application. If the refresh button does not fit into the interface, or there is no more space left for it, try pull-refresh!

    And the enormego blog is very interesting.

    tmdvs / TDBadgedCell

    TDBadgedCell adds a badgeNumber property to the UITableViewCell, which displays the specified number on the badge on the right, just like MobileMail does.

    mattball / MBCoverFlowView

    MBCoverFlowView is a class for Mac OS X that can be used to make the cover flow effect the same as it works in Finder and iTunes.

    sdegutis / SDModelObject

    SDModelObject is a simpler version of the already mentioned RMModelObject. The only thing it supports is: automatically freeing all property objects in -dealloc, checking for -isEqual: against a given set of keys and -hash.

    ccgus / jstalk

    Somehow I tried to write a couple of scripts in AppleScript. Unfortunately, I couldn’t fully understand this language, it’s painfully unusual. JSTalk is an interesting project with which you can communicate with the application through ScriptBridge using JS code. In addition, JSTalk supports a special kind of calls through a preprocessor, which allows you to use the traditional ObjC-style method calls [someObje someMeth:someArg]in JS.

    sdegutis / SDKVO

    The SDKVO category adds the following method to all objects:
    - (id) observeKeyPath: (NSString *) newKeyPath
    			  options: (NSKeyValueObservingOptions) someOptions
    			  handler: (void (^) (id object, NSDictionary * change)) newHandler;

    with which KVO can be used through blocks in 10.6SDK (iPhone4.0SDK, or PLBlocks).

    sdegutis / SDKeychain

    SDKeychain provides just two neat Cocoa APIs for working with OSX Keychain (native API only in C):
    + (NSString *) securePasswordForIdentifier: (NSString *) username;
    + (BOOL) setSecurePassword: (NSString *) somePassword forIdentifier: (NSString *) username;

    yfactorial / objectiveresource

    ObjectiveResource is the rail ActiveResource port on Objective-C. Unfortunately, I have not picked this repository from the moment of the follow-up, but, nevertheless, I mention it here, because it seems to me very interesting.

    blakeseely / bsjsonadditions

    If you rely on JSON to transmit data over the network (I personally prefer XML Plists), then try bsjsonadditions. Both encoding objects in JSON and string parsing are supported.

    sdegutis / CocoaREST

    CocoaREST includes a whole family of classes for working with the RESTful API of various services, including: Facebook, FriendFeed, Identica, Twitter. It's also quite simple to write support for your API.

    sschroed / mini-mallows

    A very simple wrapper for NSURLConnection, which allows you to make complex POST requests, including transferring files to them.

    That seems to be all. I also have some favorite repositories on Google Code (including Google Toolbox for Mac , json-framework , kissxml , plbocks and XMPP Framework ), but about them some other time.

    Also popular now: