Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrtnbroder

macrumors newbie
Original poster
Sep 18, 2013
7
0
Hello!

Since I learn alot at looking at other peoples source code (imo), I want to ask if someone knows some good open source applications where I can take a look around, how they are build and so on.

I aswell can just say that the Adium-Source is abit overkill for me as a Objective-C newbie.

Hopefully someone knows some smaller Applications ;)
 
Go here:
https://developer.apple.com/library/mac/navigation/

Enter sample code into the search box.

The result will be a list of sample apps, tools, classes, etc.


If you want sample code for a particular class, open the class reference doc (e.g. in Xcode documentation) and there should be links for sample code.

The online class reference docs also have sample code links. For example:
https://developer.apple.com/library...nsuserdefaults_Class/Reference/Reference.html

There are 5 apps (including the aforementioned TextEdit) listed as Related Sample Code.


If you haven't been reading Apple's class reference docs, you should. After you learn the basics of a class using a tutorial, you should always refer to the class reference doc, not only for additional methods, but because the class reference doc often has links to related classes that would overwhelm a tutorial context.

One of the keys to learning how to program is to learn how to learn about programming. The ability to find and read reference docs is a crucial skill. In other words, have a strategy for discovery.
 
http://opensource.apple.com

you can find lots of different apps & things here, many with xcode projects to check out. the one cavet is most "advanced" programs or libs are going to be complex and maybe difficult for a beginner to decypher. some stuff will even be in c or c++. the chess app included with os x is a perfect example.


as others have said, the best place to start for sample code is the dev portal. unlike the other "production" open source stuff metioned abobe, the majority of this is highly documented and uses higher level api until you get to some "advanced" topics like quartz or opengl.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.