Where is the source code for NSObject.m?

I am trying to find the source for NSObject.m . (I want to compare ARC implementations before and after ARC retain and release .)

I looked at http://www.opensource.apple.com/ and http://www.macosforge.org/ , but could not find it.

+7
source share
3 answers

The source code for Apple NSObject contained in the Objective-C runtime package on the Apple open source repository website.

https://opensource.apple.com/source/objc4/objc4-706/runtime/NSObject.mm

The entire Objective-C runtime package can be downloaded from https://opensource.apple.com/tarballs/objc4/objc4-706.tar.gz

Looking back at previous versions of the run-time package on the site, the NSObject.mm file NSObject.mm , added to the objc4-532 package.

+14
source

The source code for NSObject is available in the Objective-C Runtime (the latest version is available during this edit) http://opensource.apple.com/source/objc4/objc4-680/runtime/NSObject.mm as noted above. Although Cocoa (Touch) Framework is not open source, if you want to see it. In addition, there is another full implementation of NSObject in the GNUStep base package https://github.com/gnustep/base/blob/master/Source/NSObject.m .

+2
source

I'm confused. Apple makes most of the Core Foundation (based on the C API on which Foundation / Cocoa is based), available as open source. Base / Cocoa is based on OpenStep. GNUStep is an open source implementation of OpenStep.

The GNUStep implementation on NSObject.m can be found at http://wiki.gnustep.org/index.php/Main_Page

+1
source

All Articles