So far I saw many examples, but not every of them is valid, follow my rules and you will get proper singleton pattern.

in MySingleton.h file:

@interface MySingleton : NSObject
{
}
+ (MySingleton *)sharedInstance;
-(id)init;

in MySingleton.m file:

+ (MySingleton *)sharedInstance
{
    static MySingleton *sharedInstance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        sharedInstance = [[self alloc] init];
    });
    return sharedInstance;
}
-(id)init{
    if ((self=[super init]) ) {
    // put your init code here
    }
    return self;
}

And thats all. The key is to use dispatch_once which will guarantee code inside will be executed only once per whole app lifetime. You can use it like this:

NSString* someString = [[MySingleton sharedInstance] someMethodReturningString];

Apple today seeded build 13D28 of OS X 10.9.3 to developers, a little over one week after releasing the third OS X 10.9.3 beta, build 13D21 and three weeks after the first 10.9.3 beta. The beta is available through the Software Update mechanism in the Mac App Store as well as through the Mac Dev Center. Apple is currently asking developers to focus on Graphics Drivers and Audio. As was discovered with the first beta, 10.9.3 adds new support for 4K displays, offering “Retina” resolutions that improve readability along with support for 60Hz output from the Retina MacBook Pro.

running:

phpize

command can cause such sample output:

Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

solution is simple, just put:

brew install autoconf

in terminal, push enter and rerun phpize after brew finishes hiw work

First you have to get NSDateComponents object with year, month and day units:

NSDateComponents *components = [[NSCalendar currentCalendar] components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear fromDate:[NSDate date]];

then extracting each value is simple:

NSInteger day = [components day];
NSInteger month = [components month];
NSInteger year = [components year];

After five months of availability, OS X 10.9 Mavericks now generates just over 40 percent of all North American OS X-based Web traffic handled by ad network Chitika, almost doubling Mountain Lion’s current 21 percent share.

By comparison, the last-generation OS X 10.8 Mountain Lion took nearly 14 months to reach a 34 percent share and was only at 26.8 percent after seven months on the market.

As for older versions of OS X, 10.7 Lion and 10.6 Snow Leopard both account for 18 percent of Mac traffic, while OS X 10.5 Leopard is at 3 percent. The almost nine-year-old OS X 10.4 Tiger is still running on one percent of machines, while “other OS X” takes the last percent.

Well, first part is quite easy, just go to http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html and grab jre-8-macosx-x64.dmg. After downloading doubleclick and install as normal app. After installation new browser window will be opened so you can run applet to check if new version is working. It should. Now the hard part, go to Terminal and type:

java -version

you will see something like:

java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

So does it work or not? Well, it is and it does not. Why? Becouse JRE just installed is only for browser. Apple allows only one JVM (Java Virtual Machine) at same time available for user, for Mavericks its Java 6. So what can we do to make it work also from commandline? Having Terminal opened type:

export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"

and now:

java -version

this time output will be:

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

So it seems everything works now. At least until Terminal restart. To make it permanent locate your .profile file (it is in /Users/xxx/.profile where xxx is your username), open it in any text editor and at bottom add:

export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"

Using configuration mentioned above you may receive one of those (or another) errors:

types.h - User Defined Issues - Architecture not supported
_types.h - User Defined Issues - Architecture not supported
Semantic issue - Unknown type name '__int64_t', Unknown type name '__int32_t', Unknown type name '__uint64_t', Unknown type name '__uint32_t', Unknown type name '__darwin_natural_t'..

Working solution is to remove arm64 from “Standard Architectures” and leave arm64 in “Valid Architectures”