Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
/* * © 2009, Steven Troughton-Smith * http://steventroughtonsmith.blogspot.com */ #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSMutableArray *args = [NSMutableArray array]; for (int i = 0; i < argc; i++) { [args addObject:[NSString stringWithUTF8String:argv[i]]]; } NSTask *b = [NSTask new]; /* Use the path to your original SpringBoard binary */ [b setLaunchPath:@"/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk/System/Library/CoreServices/SpringBoard.app/SpringBoard_b"]; [b setArguments:args]; NSMutableDictionary *env = [NSMutableDictionary dictionaryWithDictionary:[[NSProcessInfo processInfo] environment]]; /* Use the path to your Dynamic Library */ [env setObject:@"/Library/MobileSubstrate/DynamicLibraries/MobileStack.dylib" forKey:@"DYLD_INSERT_LIBRARIES"]; [b setEnvironment:env]; [b launch]; while ([b isRunning]) { } [pool drain]; return 0; }
This paste will be private.
From the Design Piracy series on my blog: