📜 ⬆️ ⬇️

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-so-good pieces of code. I decided to structure them for myself and share with the public.



facebook / three20



A very well-known library with different functions for iPhone. Used in the official Facebook application. Previously having some problems with the private API, now Three20 is being validated in the AppStore without problems. The library is very powerful, and, because of this, somewhat complex in the initial study. There are many helper-macros in every way, starting from working with memory and ending with extended logging.
')
The package also includes interfaces for working with images (TTPhotoViewController is equivalent to the photo browser from the standard Photos), letters (fully expandable UI for sending mail). The extended TTTableViewController table controller is made specifically for retrieving data from the network. TTTextEditor is a great control that allows you to enter text into a dynamically expandable UITextView, just like an SMS does.

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

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 the file; supports a simple interface for transferring files in a POST request; there is delegate support for updating download progress; support for different 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 of the advanced features, it supports shaping downloads and work through a proxy. ASI HTTP feels great on both Mac OS X and the iPhone.

parmanoir / jscocoa


Very cool stuff - essentially bridging from Javascript to Cocoa. It works on the basis of webkit JavascriptCore, and provides more opportunities than the standard bridging.

The library allows not only to create new classes in runtime on JS, but also to perform swizzling (substitution of methods) of existing classes, as well as the implementation of standard JS methods on ObjC objects (especially I like the example with regulars from the documentation: myNSString.match(/pattern/) ). With the help of JSCocoa, you can very easily add support for scripting and plug-ins to any of your applications (just remember that you can potentially get reject for supporting scripting in iPhone applications).

andrep / RMModelObject


Did you read the guide on the implementation of model objects in Objective-C? If yes, then you imagine the amount of work needed to create a full-fledged class model, and after all Core Data is not a silver bullet ©. RMModelObject does more implementation for you. In fact, the description of the model instance is reduced 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;

 @end

 //

 @implementation MyBlogEntry

 @dynamic title, postedDate, bodyText, tagNames, categoryNames, isDraft;

 @end 


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

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

erica / *


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

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

NSDate-Extensions adds methods to NSDate to quickly create a date, check for “today”, “yesterday”, “tomorrow”, “this week”, etc. and a simple parsing of NSDate into components without involving a calendar class.

I advise to also look into other repositories of Erica.

guicocoa / GCCalendar



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

uliwitness / UliPhoneKit


Allows in two lines to play the specified sound on the iPhone. It is invaluable to quickly add a sound indication to the project, but nothing else is able.

enormego / EGOTableViewPullRefresh



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

And the blog enormego is very interesting.

tmdvs / TDBadgedCell



TDBadgedCell adds the badgeNumber property to the UITableViewCell, which shows 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 way it works in Finder and iTunes.

sdegutis / SDModelObject


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

ccgus / jstalk


Somehow I tried to write a couple of scripts in AppleScript. Unfortunately, I didn’t work out to understand this language completely, it was too unhealthy. JSTalk is an interesting project with which you can communicate with an application via ScriptBridge using JS-code. In addition, JSTalk supports a special kind of calls through the preprocessor, which allows you to use the traditional ObjC-style method call [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 C-only API):
 + (NSString *) securePasswordForIdentifier: (NSString *) username;
 + (BOOL) setSecurePassword: (NSString *) somePassword forIdentifier: (NSString *) username; 


yfactorial / objectiveresource


ObjectiveResource is the port of ActiveResource rail on Objective-C. Unfortunately, I didn’t pick this repository from the moment of fowling, but, nevertheless, I mention it here, because it seems to me very interesting.

blakeseely / bsjsonadditions


If you rely on JSON (I personally prefer XML Plists) to transfer data over the network, then try bsjsonadditions. Both encoding of objects in JSON and parsing of strings 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 is 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 a few favorite repositories on Google Code (including Google Toolbox for Mac , json-framework , kissxml , plbocks, and XMPP Framework ), but I ’m going to talk about them some other time.

Source: https://habr.com/ru/post/93117/


All Articles