CoreLib is a collection of reusable Objective-C source code to make various aspects of developing Mac and iOS applications easier & faster.
CoreLib is designed so you can just use the parts you want/need and are not forced to adopt all of it.
Just include CoreLib.h in your .pch and the files performing the tasks you are interested in.
CoreLib has these components:
categories on base Cocoa like NSArray, NSData, NSObject, NSString, etc
for iOS) subclasses for UIActionSheet, UIAlertView, etc to provide a more convenient block based interface
for Mac) convenience classes for e-mail sending, getting host information, managing login items, etc
in your PCH file:
in your applicationDidFinishLaunching: method:
cc = [CoreLib new];
some examples how CoreLib makes developing apps more fun.
[[NSUserDefaults standardUserDefaults] objectForKey:@"MyPref"]
[[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"MyPref"];
@"MyPref".defaultInt = 1;
[@"abc\ndef\nbla" componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]]
NSURL *url = [NSURL URLWithString:@"http://myhost/myfile"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; NSData *file = [NSURLConnection sendSynchronousRequest:request returningResponse:NULL error:NULL];
NSData *file = @"http://myhost/myfile".download;
there are many more convenience methods including some functional extensions for NSArray.