IPhone

EXEC_BAD_ACCESS

 * http://www.codza.com/how-to-debug-exc_bad_access-on-iphone
 * http://stackoverflow.com/questions/327082/exc-bad-access-signal-received

NSBundle
If you load test data from a file when unit testing a Cocoa application, you’ll need to access the unit testing bundle to find the file. Your first instinct might be to call NSBundle’s mainBundle: method. For a unit testing target, the main bundle should be the unit testing bundle, right? Unfortunately, the mainBundle: method is for application bundles, not unit testing bundles. Call NSBundle’s bundleForClass: method to load the unit testing bundle. The following code demonstrates how to locate the unit testing bundle: NSBundle *unitTestBundle = [NSBundle bundleForClass:[self class]];
 * http://www.cocoabuilder.com/archive/cocoa/137329-mainbundle-and-frameworks.html
 * http://www.cilinder.be/docs/next/NeXTStep/3.3/nd/Foundation/Classes/NSBundle.htmld/index.html
 * http://meandmark.com/blog/tag/unit-testing/

iPad

 * http://www.alistapart.com/articles/a-simpler-page

Backups and Updates

 * http://klauskjeldsen.dk/iphone-3g-disable-slow-itunes-backup-mac-and-windows/
 * http://dimak.blogspot.com/2008/09/how-to-avoid-lengthy-iphone-back-up.html
 * http://www.appleiphoneschool.com/2008/02/25/how-to-create-a-symbolic-link/
 * http://stackoverflow.com/questions/4778284/iphone-preserve-user-data-against-app-update

Prefix Header File
#define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #define ALog(...) #define DLog(...) do { } while (0) #ifndef NS_BLOCK_ASSERTIONS #define NS_BLOCK_ASSERTIONS #endif #define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
 * http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/
 * 1) ifdef DEBUG
 * 1) else
 * 1) endif
 * 1) define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0)
 * http://serenity.uncc.edu/web/ADC/2005/Developer_DVD_Series/April/ADC%20Reference%20Library/documentation/DeveloperTools/Conceptual/Build_System/Precompiled_Headers/pch.html

PhoneGap

 * http://blog.assortedgarbage.com/2011/02/adding-a-splash-screen-for-android-using-phonegap/

FileSystem
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"txt"]; NSData *myData = ;  if (myData) {      // do something useful  }  - (void)createEditableCopyOfFileIfNeeded {     // First, test for existence.     BOOL success;     NSFileManager *fileManager = [NSFileManager defaultManager];     NSError *error;     NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);     NSString *documentsDirectory = [paths objectAtIndex:0];     NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"FileName"];     success = [fileManager fileExistsAtPath:writableDBPath];     if (success) return;     // The writable database does not exist, so copy the default to the appropriate location.     NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"FileName"];     success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error];     if (!success) {         NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);     } }
 * http://iphonedevelopertips.com/data-file-management/iphone-file-system-creating-renaming-and-deleting-files.html
 * https://github.com/sjlombardo/csfio
 * http://www.dkszone.net/browse-iphone-jailbroken-also-file-system-with-iphone-analyzer
 * http://www.tuaw.com/2008/05/31/iphonebrowser-browse-your-iphones-file-system/
 * http://www.servin.com/iphone/iPhone-File-IO.html
 * http://stackoverflow.com/questions/1174101/problem-with-nssearchpathfordirectoriesindomains
 * http://www.iphonedevsdk.com/forum/iphone-sdk-development/15659-nssearchpathfordirectoriesindomains-help.html
 * http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/LowLevelFileMgmt/Articles/StandardDirectories.html#//apple_ref/doc/uid/20001279
 * http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSSearchPathForDirectoriesInDomains
 * http://iphoneincubator.com/blog/data-management/how-to-read-a-file-from-your-application-bundle
 * http://groups.google.com/group/iphonesdkdevelopment/browse_thread/thread/7da982bcbaa9de65?hl=en

SQLite

 * http://mobileorchard.com/tutorial-iphone-sqlite-encryption-with-sqlcipher/
 * http://mobileorchard.com/interview-transparent-encryption-of-iphone-sqlite-databases-with-sqlcipher/
 * http://mobileorchard.com/sqlcipher-transparent-sqlite-encryption-for-iphone-apps/
 * http://mobileorchard.com/iphone-sqlite-tutorials-and-libraries/
 * http://gusmueller.com/blog/archives/2008/06/new_home_for_fmdb.html

Static Libraries

 * http://mobileorchard.com/code-sharing-via-static-libraries-and-cross-project-references/
 * http://mobileorchard.com/sharing-compiled-code-building-static-libraries-in-xcode-for-the-iphone/
 * http://blog.stormyprods.com/2008/11/using-static-libraries-with-iphone-sdk.html
 * http://www.amateurinmotion.com/articles/2009/02/08/creating-a-static-library-for-iphone.html
 * http://stackoverflow.com/questions/159221/how-do-i-create-a-bundle-of-reusable-code-in-xcode

Logging

 * http://cavoort.com/2010/01/04/log4cocoa-in-an-iphone-project/

KVC/KVO - Key Value Coding
"Those have to do with manually controlling key value observing. Normally the system takes care of it but these allow you some control. Look at this documentation to understand when and how to use them here."
 * http://stackoverflow.com/questions/3018242/when-to-use-willchangevalueforkey-and-didchangevalueforkey

Fundamentals

 * http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/KeyValueCoding/Concepts/BasicPrinciples.html#//apple_ref/doc/uid/20002170-BAJEAIEE
 * http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/KeyValueObserving/Concepts/AutoVsManual.html
 * http://www.cocoabuilder.com/archive/cocoa/174625-is-willchangevalueforkey-always-needed.html
 * http://developer.apple.com/library/ios/#documentation/cocoa/Conceptual/Multithreading/Introduction/Introduction.html#//apple_ref/doc/uid/10000057i
 * http://developer.apple.com/library/ios/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008091

Other

 * http://www.noodlesoft.com/blog/2009/06/30/fun-with-kvc/
 * http://stackoverflow.com/questions/2293448/what-is-the-kvc-search-pattern-for-mutablearrayvalueforkey
 * http://stackoverflow.com/questions/2230387/accessing-collection-through-kvc-to-protect-collection-and-be-kvo-compliant

Overview

 * http://www.tomdalling.com/blog/cocoa/how-cocoa-bindings-work-via-kvc-and-kvo
 * http://www.slideshare.net/sergio.acosta/intro-to-cocoa-kvckvo-and-bindings-presentation
 * http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Concepts/WhatAreBindings.html
 * http://www.cocoabuilder.com/archive/cocoa/294354-any-way-to-synthesize-kvc-compliant-collections.html
 * http://stackoverflow.com/questions/2293448/what-is-the-kvc-search-pattern-for-mutablearrayvalueforkey
 * http://stackoverflow.com/questions/2230387/accessing-collection-through-kvc-to-protect-collection-and-be-kvo-compliant

Threading
- (void)threadWorker { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 * http://stackoverflow.com/questions/1124207/what-is-the-basic-difference-between-nstimer-nstask-nsthread-and-nsrunloop
 * http://www.xprogress.com/post-36-threading-tutorial-using-nsthread-in-iphone-sdk-objective-c/
 * http://forums.macrumors.com/showthread.php?t=436162

while (!_threadNotDone) { // do some work

[outputTextField1 performSelectorOnMainThread ... ];   }

[pool release]; } - (void) searchFieldChanged:(UITextField*) textField {
 * http://stackoverflow.com/questions/2840406/nsoperations-or-nsthread-for-bursts-of-smaller-tasks-that-continuously-cancel-eac

[NSObject cancelPreviousPerformRequestsWithTarget:self]; NSString *searchString = textField.text;

if ([searchString length] > 0) {

[self performSelector:@selector(doSearch:) withObject:textField.text afterDelay:0.8f]; } }

- (void) doSearch:(NSString*) searchString {

[queue cancelAllOperations]; ISSearchOperation *searchOperation = [[ISSearchOperation alloc] initWithSearchTerm:searchString];   [queue addOperation:searchOperation];    [searchOperation release]; }

@implementation ISSearchOperation

- (void) dealloc {

[searchTerm release]; [JSONresult release]; [parsedResult release]; [super dealloc]; }

- (id) initWithSearchTerm:(NSString*) searchString {

if (self = [super init]) {

[self setSearchTerm:searchString]; }

return self; }

- (void) main {

if ([self isCancelled]) return; [self setJSONresult:/*do webservice call synchronously*/]; if ([self isCancelled]) return; [self setParsedResult:/*parse JSON result*/]; if ([self isCancelled]) return;

[self performSelectorOnMainThread:@selector(searchDataReady:) withObject:self.parsedResult waitUntilDone:YES]; }

@end

Grand Central Dispatch (GCD), Concurrency and NSOperation
- (void) loadData { /* Operation Queue init (autorelease) */ NSOperationQueue *queue = [NSOperationQueue new]; /* Create our NSInvocationOperation to call loadDataWithOperation, passing in nil */ NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self       selector:@selector(loadDataWithOperation)        object:nil];    /* Add the operation to the queue */    [queue addOperation:operation];    [operation release]; } - (void) loadDataWithOperation {    NSURL *dataURL = [NSURL URLWithString:@"http://icodeblog.com/samples/nsoperation/data.plist"];    NSArray *tmp_array = [NSArray arrayWithContentsOfURL:dataURL];    for(NSString *str in tmp_array) {        [self.array addObject:str];    }    [self.tableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; } "With Leopard, three classes have been added for Cocoa developers to take advantage of multi-core, and concurrency in general, while avoiding the intricacy of low-level multi-threading: NSOperation, NSInvocationOperation, and NSOperationQueue. The NSOperation and NSOperationQueue classes alleviate much of the pain of multi-threading, allowing you to simply define your tasks, set any dependencies that exist, and fire them off."
 * http://www.cimgf.com/2008/02/16/cocoa-tutorial-nsoperation-and-nsoperationqueue/
 * http://developer.apple.com/library/ios/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationObjects/OperationObjects.html#//apple_ref/doc/uid/TP40008091-CH101-SW1
 * http://eschatologist.net/blog/?p=232
 * http://alexvollmer.com/posts/2010/09/19/nsoperations-for-fun-and-profit/
 * http://icodeblog.com/2010/03/04/iphone-coding-turbo-charging-your-apps-with-nsoperation/
 * 1) Instantiate a new NSOperationQueue object
 * 2) Create an instance of your NSOperation
 * 3) Add your operation to the queue
 * 4) Release your operation
 * http://developer.apple.com/library/ios/#documentation/cocoa/reference/NSOperation_class/Reference/Reference.html
 * http://developer.apple.com/Cocoa/managingconcurrency.html

pdfs

 * http://stackoverflow.com/questions/3042775/show-pdf-in-ipad-using-cgpdf-apis
 * http://www.olivetoast.com/blog/2009/08/simple-uiscrollview-catiledlayer-pdf-example/
 * http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html

Unit Testing
Double click 'Run script' under 'Targets'/'Your script target name' then type
 * http://blog.jayway.com/2010/01/15/test-driven-development-in-xcode/
 * http://stackoverflow.com/questions/1092396/iphone-retrieving-resources-for-logical-unit-tests
 * http://stackoverflow.com/questions/2002330/implementing-unit-testing-with-the-iphone-sdk

"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 1> /tmp/RunUnitTests.out
 * 1) Run the unit tests in this test bundle.

Basically you need to append

1> /tmp/RunUnitTests.out

Apps

 * iVersion http://itunes.apple.com/us/app/iversion/id320298553?mt=8

HTML

 * http://mobile.tutsplus.com/tutorials/iphone/iphone-web-app-meta-tags/
 * http://www.gyford.com/phil/writing/2010/07/06/web-page-iphone.php

Lazy Loading

 * http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Introduction/Intro.html
 * http://akosma.com/2009/01/28/10-iphone-memory-management-tips/

App Delegate
MyAppDelegateClass *app = (MyAppDelegateClass *)[[UIApplication sharedApplication] delegate];
 * http://www.iphonedevsdk.com/forum/iphone-sdk-development/4519-app-delegate-singleton.html
 * http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html
 * http://stackoverflow.com/questions/338734/iphone-proper-usage-of-application-delegate
 * http://stackoverflow.com/questions/817259/can-you-access-application-delegate-from-within-a-uitableviewdatasource-function
 * http://getsetgames.com/2009/12/14/iphonedev-advent-tip-14-how-to-retrieve-your-app-delegate-singleton-instance/

Screen Size
CGRect screenBounds = [[UIScreen mainScreen] bounds] NSLog(@"%@", NSStringFromCGRect(screenBounds));
 * http://stackoverflow.com/questions/3925277/uiscreen-mainscreen-bounds-returns-null

Callbacks
Delegate /// Header File @interface MyClass : NSObject { id delegate; } - (void)setDelegate:(id)delegate; - (void)doSomething; @end
 * http://stackoverflow.com/questions/1015608/how-to-perform-callbacks-in-objective-c

@interface NSObject(MyDelegateMethods) - (void)myClassWillDoSomething:(MyClass *)myClass; - (void)myClassDidDoSomething:(MyClass *)myClass; @end

/// Message (.m) File @implementation MyClass - (void)setDelegate:(id)aDelegate { delegate = aDelegate; /// Not retained }

- (void)doSomething { [delegate myClassWillDoSomething:self]; /* DO SOMETHING */ [delegate myClassDidDoSomething:self]; } @end Block - Closure @interface MyClass: NSObject {   void (^_completionHandler)(int someParameter); }

- (void) doSomethingWithCompletionHandler:(void(^)(int))handler; @end

@implementation MyClass

- (void) doSomethingWithCompletionHandler:(void(^)(int))handler {   // NOTE: copying is very important if you'll call the callback asynchronously, // even with garbage collection! _completionHandler = [handler copy];

// Do stuff, possibly asynchronously... int result = 5 + 3;

// Call completion handler. _completionHandler(result);

// Clean up. [_completionHandler release]; _completionHandler = nil; }

@end

...

MyClass *foo = [[MyClass alloc] init]; int x = 2; [foo doSomethingWithCompletionHandler:^(int result){   // Prints 10    NSLog(@"%i", x + result); }]; Selector @interface Foo : NSObject { } - (void)doSomethingAndNotifyObject:(id)object withSelector:(SEL)selector; @end

@interface Bar : NSObject { } @end

@implementation Foo - (void)doSomethingAndNotifyObject:(id)object withSelector:(SEL)selector { /* do lots of stuff */ [object performSelector:selector withObject:self]; } @end

@implementation Bar - (void)aMethod { Foo *foo = [[[Foo alloc] init] autorelease];   [foo doSomethingAndNotifyObject:self withSelector:@selector(fooIsDone:)]; }

- (void)fooIsDone:(id)sender { NSLog(@"Foo Is Done!"); } @end
 * http://stackoverflow.com/questions/316879/handling-callbacks-in-objective-c

Specs

 * http://www.apple.com/iphone/specs.html

Localization

 * http://www.iphonesdkarticles.com/2008/11/localizing-iphone-apps.html

Rejection

 * http://10base-t.com/unofficial-appstore-rejection-criteria/

Web

 * http://www.big5apps.com/tutorial
 * http://docs.phonegap.com/phonegap_notification_notification.md.html

Vibration
... AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
 * http://mobile.tutsplus.com/tutorials/iphone/iphone-vibrate/
 * http://stackoverflow.com/questions/2718837/how-to-run-vibrate-continuously-in-iphone
 * http://discussions.apple.com/thread.jspa?threadID=1700706
 * 1) import 
 * http://www.cocos2d-iphone.org/forum/topic/4169
 * http://www.kimballlarsen.com/2009/12/22/how-to-make-iphone-vibrate-for-a-long-time/
 * http://www.servin.com/iphone/iPhone-Vibrate.html

NSString(UIStringDrawing) Size With Font

 * http://www.iphonedevsdk.com/forum/iphone-sdk-development/8339-create-uilabel-fit-into-text-size.html
 * http://www.iphonedevsdk.com/forum/iphone-sdk-development/3739-how-should-i-display-detail-view-variable-length-strings.html
 * http://stackoverflow.com/questions/4382976/multiline-uilabel-with-adjustsfontsizetofitwidth
 * http://stackoverflow.com/questions/3520855/resizing-uilabel-to-fit-with-word-wrap
 * http://stackoverflow.com/questions/1352735/why-is-my-sizewithfontconstrainedtosizelinebreakmode-always-returning-zero
 * http://discussions.apple.com/thread.jspa?threadID=1521219

Properties
"If you are writing your own setter/getters, atomic/nonatomic/retain/assign/copy are merely advisory."
 * http://cocoacast.com/?q=node/103 - properties
 * http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html
 * http://stackoverflow.com/questions/588866/objective-c-properties-atomic-vs-nonatomic

Categories

 * http://stackoverflow.com/questions/3221972/what-happens-if-two-objc-categories-override-the-same-method

Resources
"There are many neat community sites out there that you may want to have a look at. http://cocoadevcentral.com, the http://cocoadev.com Wiki, http://ideveloper.tv, http://cocoaobjects.com, and of course Apple's http://developer.apple.com - and there are many Mac programmers with blogs and web sites of their own. There's also a thriving community of Mac programmers on Twitter, like @rentzsch, @violasong, @kevinhoctor, @AaronHillegass and others."
 * http://icodeblog.com/
 * http://www.iphonedevsdk.com/
 * http://www.iphonedevforums.com/
 * http://cocoadevcentral.com/d/learn_objectivec/
 * http://lists.apple.com/archives/cocoa-dev/2011/Jan/msg00625.html

Media

 * http://stackoverflow.com/questions/2546006/mpmovieplayercontroller-problems-on-ipad

Notifications

 * http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html

TreeView

 * http://blog.atebits.com/2008/12/fast-scrolling-in-tweetie-with-uitableview/
 * http://stackoverflow.com/questions/2815121/uitableviewcell-without-using-deprecated-method-initwithframereuseidentifier

UIButton
- (void)viewDidLoad { [super viewDidLoad]; myButton.titleLabel.adjustsFontSizeToFitWidth = TRUE; }
 * http://forums.macrumors.com/showthread.php?t=541280

Timers

 * http://iphone-dev-tips.alterplay.com/2010/08/timer-app-supporting-both-ios-4x-and.html

Guidelines

 * Memory Management Programming Guide
 * Information Property Key List

Submission

 * http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html
 * http://stackoverflow.com/questions/2480563/how-do-i-specify-both-icons-for-a-universal-iphone-ipad-app
 * http://my.safaribooksonline.com/-/9780132619646
 * http://www.amazon.com/Enterprise-iPhone-iPad-Administrators-Guide/dp/1430230096

GCC

 * http://www.atomicbird.com/blog/2008/07/xctotd-i-dont-want-you-process-those-files
 * http://www.nimblekit.com/wiki/index.php/Warning:_no_rule_to_process_file
 * http://www.mailinglistarchive.com/xcode-users@lists.apple.com/msg04396.html

Required Capabilities
UIRequiredDeviceCapabilities still-camera
 * http://developer.apple.com/library/ios/#qa/qa2010/qa1397.html
 * http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BuildTimeConfiguration/BuildTimeConfiguration.html
 * http://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html
 * http://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.htm
 * http://stackoverflow.com/questions/3765837/how-to-properly-set-uirequireddevicecapabilities

Network

 * http://bitbucket.org/snej/mynetwork/wiki/Home
 * http://stackoverflow.com/questions/501231/can-i-use-nsurlcredentialstorage-for-http-basic-authentication
 * http://allseeing-i.com/ASIHTTPRequest/

Forums
"CGContextConvert* ... screen.scale"
 * http://stackoverflow.com/users/225020/jaba
 * http://www.drobnik.com/touch/2009/07/cocoa-crack-quiz-1/
 * http://www.drobnik.com/touch/2010/02/are-you-a-cocoa-crack-quiz-2/
 * https://devforums.apple.com/message/289728

Security
Your implementation should work, but I have a few suggestions for you. category method to the class. or intermediate C string. refer to them as encryption.
 * How to encrypt string to SHA1
 * http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg65035.html
 * Unless you need HMAC specifically, the function you are using is in .
 * In general, I think Apple discourages relying on the output of the "description", although I see that the documentation for NSData states that description will produce a string in property list format, so it is unlikely to change. For your needs, there is a better way anyway.
 * While there is nothing wrong with using a class method, consider adding a
 * You can verify your results with "openssl" on the command line. In Terminal:
 * NSString has a method that returns an NSData, so you don't have to create an
 * SHA1 and MD5 are hashes, not encryption. Strictly speaking it is incorrect to
 * Here is an alternate implementation with an example usage:
 * 1) import 
 * 2) include 

@interface NSData (NSDataDigestCategory) - (NSString *)sha1; @end

@implementation NSData (NSDataDigestCategory) - (NSString *)sha1 { uint8_t digest[CC_SHA1_DIGEST_LENGTH]; CC_SHA1([self bytes], [self length], digest);

// use an uppercase X to get an uppercase hash NSString *hash = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", digest[0], digest[1], digest[2], digest[3], digest[4], digest[5], digest[6], digest[7], digest[8], digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], digest[15], digest[16], digest[17], digest[18], digest[19], digest[20]];

// or, if you prefer: NSMutableString *hash2 = [NSMutableString stringWithCapacity:40]; for (int i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) [hash2 appendFormat:@"%02x", digest[i]]; return hash; // or hash2 } @end

@interface NSString (NSStringDigestCategory) - (NSString *)sha1; @end

@implementation NSString (NSStringDigestCategory) - (NSString *)sha1 { NSData *data = [self dataUsingEncoding:NSUTF8StringEncoding]; return [data sha1]; } @end

int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [NSAutoreleasePool new]; NSLog(@"SHA1: %@", [@"Some text to hash" sha1]); [pool drain]; return 0; }

NSTsks, NSPipes, NSFile, Zip
- (NSData*)UnzipFile:(NSString*)sourcePath extractFileName:(NSString*)extractFileName {       NSTask    *unzip = [NSTask alloc] init] autorelease];    NSPipe    *aPipe = [NSPipe pipe];    [unzip setStandardOutput:aPipe];    [unzip setLaunchPath:@"/usr/bin/unzip"];    [unzip setArguments:[NSArray arrayWithObjects:@"-p", sourcePath, extractFileName, nil; [unzip launch];
 * http://dev.notoptimal.net/2007/04/nstasks-nspipes-and-deadlocks-when.html
 * http://www.cocoadev.com/index.pl?UsingZipFilesExamples
 * http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg65016.html

NSMutableData   *dataOut = [NSMutableData data]; NSData           *dataIn = nil; NSException       *error = nil; while((dataIn = [[aPipe fileHandleForReading] availableDataOrError:&error]) && [dataIn length] && error == nil){       [dataOut appendData:dataIn];    }    if([dataOut length] && error == nil){        return dataOut;    }    return nil; }

// Then I subclassed NSFileHandler this way

@implementation NSFileHandle (MyOwnAdditions) - (NSData*)availableDataOrError:(NSException**)returnError {   for{ @try{ return [self availableData]; }...@catch (NSException *e) { if ([[e name] isEqualToString:NSFileHandleOperationException]) {               if ([[e reason] isEqualToString:@"*** -[NSConcreteFileHandle availableData]: Interrupted system call"]) {                    continue;                }                if (returnError)                    *returnError = e;                return nil;            }            @throw;        }    } } @end

Frameworks

 * Objective-C
 * Objective-C++
 * Core Animation
 * Core Data
 * Core Text
 * Cocoa Foundation
 * STL
 * Core Audio
 * Settings Application Schema Reference
 * DrawKit

Classes
Core Data
 * NSManagedObject

Core Foundation
 * CFNumberFormatter

Core Graphics
 * CGContext
 * Quartz 2D Programming Guide: Color and Color Spaces
 * CATransitions

Next Step
 * NSCalendar
 * NSDate
 * NSDateFormatter
 * NSDecimal
 * NSFetchedResultsController
 * NSNumberFormatter
 * NSRange
 * NSString
 * NSTimeInterval
 * NSURLConnection
 * NSXMLParser

Cocoa
 * NSSplitView
 * NSToolbar

UIKit
 * UIActionSheet
 * UIActivityIndicator
 * UIAlertView
 * UIButton
 * UIColor
 * UIControl
 * UIFont
 * UIImage
 * UIImageView
 * UILabel
 * UINavigationBar
 * UINavigationController
 * UIPickerView
 * UISearchDisplayController
 * UITabBarController
 * UITableView
 * UITableViewController
 * UIToolbar
 * UITableViewCell
 * UIView
 * UIViewController
 * UIWebView

Testing

 * Unit Testing
 * http://developer.apple.com/bugreporter/
 * https://bugreport.apple.com/
 * http://openradar.appspot.com/page/1

Custom

 * http://sites.google.com/site/psychopupnet/iphone-sdk/tenkeypadcustom10-keypadwithdecimal
 * FileMaker
 * http://www.iphoneexamples.com/
 * http://atastypixel.com/blog/making-uitoolbar-and-uinavigationbars-background-totally-transparent/
 * http://yoursiphone.blogspot.com/2010/10/code-to-move-view-upward-after-clicking.html

Coopetition

 * http://www.anywiseenterprise.com/Anywise_Ent/Gym_Buddy_3.2.8.html
 * http://www.anywiseenterprise.com/Anywise_Ent/Scool_Buddy.html
 * http://www.anywiseenterprise.com/Anywise_Ent/Gym_Buddy.html
 * http://www.anywiseenterprise.com/Anywise_Ent/Nolan_Chart.html

Alerts

 * http://iloveco.de/uikit-alert-types/

SMS

 * http://www.iphonedevsdk.com/forum/iphone-sdk-development/4043-sms-api.html

Examples
NSString *myPath = [myUrl path]; NSData *imageData = [NSData dataWithContentsOfURL:[info objectForKey:@"UIImagePickerControllerMediaURL"]];
 * http://stackoverflow.com/questions/1733618/saving-video-from-uiimagepickercontroller

NSString *tempPath = [NSString stringWithFormat:@"%@/Documents/%@.mp4",NSHomeDirectory,dateStr];

; - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
 * http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos

// Try to get the original file. NSURL *originalFile = [info objectForKey:UIImagePickerControllerMediaURL]; if (originalFile) { NSData *fileData = [NSData dataWithContentsOfURL:originalFile]; } }

dlog and plists
UIStatusBarStyle UIStatusBarStyleBlackOpaque // DLog is almost a drop-in replacement for NSLog // DLog; // DLog(@"here"); // DLog(@"value: %d", x); // Unfortunately this doesn't work DLog(aStringVariable); you have to do this instead DLog(@"%@", aStringVariable); - (id)readPlist:(NSString *)fileName { NSData *plistData; NSString *error; NSPropertyListFormat format; id plist; NSString *localizedPath = [[NSBundle mainBundle] pathForResource:fileName ofType:@"plist"];    plistData = ;      plist = [NSPropertyListSerialization propertyListFromData:plistData mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&error];     if (!plist) {        NSLog(@"Error reading plist from file '%s', error = '%s'", [localizedPath UTF8String], [error UTF8String]);        [error release];     }     return plist;  }
 * http://iPhoneIncubator.com/blog/windows-views/how-to-set-the-style-of-the-iphone-status-bar
 * http://iPhoneIncubator.com/blog/debugging/the-evolution-of-a-replacement-for-nslog
 * 1) ifdef DEBUG
 * 2) 	define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
 * 3) else
 * 4) 	define DLog(...)
 * 5) endif
 * http://iPhoneIncubator.com/blog/windows-views/image-processing-tricks
 * http://iPhoneIncubator.com/blog/data-management/reading-and-writing-plists

- (NSArray *)getArray:(NSString *)fileName { return (NSArray *)[self readPlist:fileName]; }  - (NSDictionary *)getDictionary:(NSString *)fileName { return (NSDictionary *)[self readPlist:fileName]; }

- (void)writePlist:(id)plist fileName:(NSString *)fileName { NSData *xmlData; NSString *error; NSString *localizedPath = [[NSBundle mainBundle] pathForResource:fileName ofType:@"plist"];    xmlData = [NSPropertyListSerialization dataFromPropertyList:plist format:NSPropertyListXMLFormat_v1_0 errorDescription:&error];     if (xmlData) {        ;     } else {        NSLog(@"Error writing plist to file '%s', error = '%s'", [localizedPath UTF8String], [error UTF8String]);        [error release];     }  }