Skip to content

Instantly share code, notes, and snippets.

@nolanw
nolanw / NSBundle+StopAutoloadingNibs.m
Created February 5, 2011 23:04
Prevent NSApp from autoloading a nib at launch.
#import <Foundation/Foundation.h>
// NSApplication has this weird habit of trying very hard to load a nib at
// launch. If there are none in the app bundle, it'll wander off into the
// frameworks until it finds one, then try to use it.
//
// You know this is what's happening if you get four log messages at launch
// saying "Could not connect the action buttonPressed: to target of class
// NSApplication". You've deleted MainMenu.nib and removed the "Main nib file
@nolanw
nolanw / ios-configure
Created January 26, 2011 01:48
Compile a library for iOS 4.3 using its configure script
#!/bin/bash
# ios-configure runs a "configure" script using the iOS 4.3 SDK, generating a
# static library that will load and run on your choice of iPhone, iPad, and
# their respective simulators.
#
# Simply run in the same directory as a "configure" script.
# You can run this script for multiple targets and use lipo(1) to stitch them
# together into a universal library.
#
@nolanw
nolanw / NSObject+ProcObservation.h
Created January 6, 2010 08:32
Slight alteration of Any Matuschak's BlockObservation for MacRuby.
//
// NSObject+ProcObservation.h
// Version 1.0
//
// Andy Matuschak
// [email protected]
// Public domain because I love you. Let me know how you use it.
//
// NTW 2009-Oct-21: Added selectors with an options argument.
// NTW 2009-Oct-30: Transplanted new observation key from MYUtilities's KVUtils.