As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
This question's answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions.
I have developed for a number of years in Java, primarily for Linux and Windows. During my undergrad and grad school times, I also did quite a bit in C and C++. I have recently (in the last year and a half) started using primarily Apple computers at home, and am interested in exploring their Xcode development environment. I am interested in learning how to use the Cocoa interface, etc. However, I know nothing (or next to nothing) about Objective-C. I am aware it is a pure superset of C, however I am interested in some resources for learning it.
In the past, to teach myself concepts of Swing for Java, I have used O'Reilly books, such as the Swing Bible, Java Swing by Marc Loy et. al. Is there a similar book for Objective-C, or a book that is really good to learn from? I would prefer if it was fairly technical, had examples, etc. Has anyone else attempted to learn Objective-C this way? Are there any specific things I should look at?
Just to note, yes I do have K&R, I have read it too many times to count, and I am aware of C syntax. It has been a while, but I do remember large amounts of it. :) I did see this question, but I did not see any particular resources mentioned, simply some general statements about learning.
Thanks!
Concepts in Objective-C Programming and Cocoa Core Compentencies - Apple's official basic documentation for the language and the Cocoa framework.
Cocoa Programming for Mac OS X - The definitive book for Cocoa newcomers. It's actually focused on the Cocoa frameworks more than Objective-C, but still invaluable.
Programming in Objective-C 2.0 - Focuses on Objective-C itself more than Cocoa; may have more basic information than an experienced programmer would need, but covers plenty of good stuff.
The "Language" part of Matt Neuberg's Programming iOS 6 covers Objective-C itself in detail.
CocoaDevCentral - Excellent tutorials. Start with the "Learn ..." and "Objective-C Style" tutorials.
Stanford's free CS193E and CS193P courses
CocoaHeads.org - A large list of resources (books, website, and code) about Cocoa/Objective-C.
HyperJeff's Cocoa Literature List - A huge compendium of useful information, etc.
Cocoa With Love - An excellent blog with specific, useful snippets and in-depth explanation.
Cocoa Is My Girlfriend - A fun and useful blog (usually) about Cocoa.
Best Practices for Cocoa Programmers (by Aaron Hillegass) - A bit dated, but contains some nuggets and guidelines for understanding and following Objective-C/Cocoa conventions
CocoaDev.com wiki - Especially good for specific questions about a specific class or task. (Undergoing updates.)
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Sorry if this is an annoying question, but I'm new to iOS development and since allot of people always tells me it's important to read Apple documentations, and there are alooot of them, so I though you can maybe list some of the Fundamental ones for newbies to begin with.
Appreciate it.
I read, in this order:
Object Oriented Programming with Objective-C
Your first iOS app
The Objective-C programming language
Cocoa fundamentals guide
Objective-C runtime programming guide (skimmed)
View controller programming guide for iOS
Text,web and editing programming guide for iOS.
Core Data tutorial for iOS
There is some repetition/overlapping between these guides so after the first three or so it will be a fast read.
Don't bother buying guides and cookbooks: they just regurgitate what's in the official documentation. Once you are finished reading the basic documentation watch some videos of Apple's WWDC (for free on iTunes) of topics of your interest, ad especially the talk about ARC (about memory management).
UPDATE:
Concerning classes you'll just check them as you need to use them. Probably the most used are the controllers (UINavigationController, UIViewController..), NSString, UIButton, UITextView, UILabel and all the containers (NSArray, NSMutableArray, NSSet, NSDictionary..). However I would not try to study them before you need them in your code. It's just the more you use them the easier it will be to do so.
Here are some links for iOS technology:
iOS App Programming Guide: Explains from basic to high level concepts of iOS programming
Programming with Objective-C: Regarding How to do programming in Objective-C
Coding Guidelines for Cocoa: A developer should follow language/platform specific coding rules/guidelines. Here is the Cocoa guidelines, so while writing your code please ensure that all this rules are getting satisfied.
While learning/searching, please refer Apple iOS documentation at first priority, otherwise search engines are there to help you out.
Hope this information will help you to start up in iOS application development.
There is a lot to read and with out knowing what you are looking for this is close to impossible. I'd suggest starting with CS 193P iPhone Application Development by the Stanford University online course (which you can find on iTunesU) that summarize everything in a more efficient way than just reading the documentation but if you insist the NSString class is a good way to start.
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm fairly new to Objective C, but have had some experience with Java. In Java tools like JUnit and JDocs can be extremely useful. Do these tools have parallels within Objective C, or are there even more useful tools for Objective C? At the moment I'm using X-Code and the iOS simulator.
Thanks for the help!
Off the top of my head...
Most useful are all the resources in developer.apple.com. They have docs, examples, references etc.
Also, use the Instruments app to help debug, analyse, and monitor your app. The various 'Instruments' therein are very useful.
For unit testing, you can include these when creating your app as standard (by simply checking the appropriate box). OCUnit is included. You can also try Google Toolbox, GHUnit, CATCH and OCMock to supplement this.
If I think of anything else, I'll let you know.
You can find about unit testing here. https://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/UnitTesting/00-About_Unit_Testing/about.html
For acceptance testing, KIF (Keep It Functional) from Square is a good option. KIF can simulate buttons clicks and text entries.
https://github.com/square/KIF/
Instruments is really useful tool to debug memory issues. Leaks and Allocations tools have been very useful. You can see who is retaining and releasing a particular objects in Allocation tools, which is useful in finding out retain-cycles. If you work with codes before ARC, 'zombie' tool is invaluable as well.
Static Analyzer in XCode can quickly point out some potential issues.
XCode--> Product --> Analyze
Other than Apple excellent documentation, you can also watch WWDC videos.
https://developer.apple.com/videos/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
MonoTouch is great for cross-platform app development. This makes a very strong business argument and I am on verge of developing using MonoTouch with prospects of branching into Android and WinMo. Before starting commercial development in MonoTouch I want to ask one last question, just in case I've missed something critical in my research so far:
What do you think is the biggest drawback of MonoTouch as compared to Objective C?
Barring games development, use whatever context comes to your mind.
Thanks
Steph
UPDATE: Following link probably best answers the question: http://docs.xamarin.com/ios/about/limitations. Conflict of interest is that it comes from Xamarin. Thanks to everyone who contributed!
In my opinion MonoTouch is just great, if you are an c#-developer. You can use almost everything from the full .net-framework and it works like a charm.
Your app gets a bit bigger in a meaning of filesize and you are at the mercy of Xamarin. The only real drawback I have found until now is that you have to change a lot between xcode and monodevelop IF you use the interface-builder. As I don't use the IB that wasn't a big dealbreaker for me (I don't use the visual studio designer either...)
If you know c# and would have to learn Objective-C -> go for MonoTouch!
If you don't know both, it might be a good choice to learn the "real way" to code native apps. Btw. you need some knowledge of Objective-C or iOS-development in general. So you know how to use Views and ViewControllers, what's the names of the methods and so on.
UPDATE: To answer your questions in the comment. The farest I have gone by now, was kinda migrating an existing opensource Objective-C-GUI-Library (kind of popoverControl) to an MonoTouch project. That was rather straightforward and easy. Direct using of Objective-C-Libraries wasn't in my needs by now. But you can read about it in the Xamarin-Docs.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I don't work at a software company, but have taught myself C# and have been using it fairly regularly. Now another engineer in the office (not a software engineer) has expressed an interested in learning to code like I can. I'm helping him through some simple console applications, but he's having some trouble grasping all the OOP concepts. He's an engineer so he's had experience with procedural programing in school, but the concept like objects, classes and instances are really challenging him.
I suggested he get the Head First C# book, but I was also wondering if anyone knew of any good tutorials on line that explained OOP principles. He's using C# but it really could be language agnostic. Also something with a lot of pictures and diagrams would be the most helpful.
I don't know how much he knows already, but I remember having a hard time switching from procedural to OO too. It took me a long time to figure out (in VB that was) Label1.Caption = TextBox1.Text but once I got that, a whole new world opened before me, although it took a while to get to actually creating classes and think about stuff like inheritance.
I don't know a book, but if this guy knows procedural programming and he's struggling with the same concept as I mentioned above, maybe a few metafores could help. It's almost as good as a diagram, or even better. ;)
If you compare an object to a device, let's say a cell phone, it would make sense how each different cell phone is an instance, while all cell phones of the same model have the same class. Accordingly, the buttons and/or the software on it could be seen as methods. You got a method dial(phonenumber), and you got properties, like a list of contacts. Each phone of the same class has the same properties, although the values can differ. Everyone's got different contacts in their phone book.
This is just a silly metafore, but I'm sure you can make up some other ones for other OO concepts.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've done a bit of iPhone programming (even have 1 published app) but what I'm really interested in doing is learning to create applications for OS X.
I'm a 7 year .Net Developer so I have some understanding of how to make desktop applications, though I don't know much about memory management as .Net spoiled me.
I was hoping someone could point me in the direction of a good tutorial for Objective-C/Cocoa but SPECIFICALLY targeting networking protocols as the application I have in mind would need to have networking capabilities (it's a turn based game with included chat).
Everywhere I look for tutorials these days leads me to iPhone and Cocoa-Touch tutorials but I need desktop tutorials.
You're probably gonna have to tackle the two subjects separately. For general desktop app development, Aaron Hillegass' book Cocoa Programming for Mac OS X is the most often recommended. It also covers memory management, though if you've already gotten an iPhone application published, I presume you've already tackled the subject.
For networking, Apple provides Getting Started with Networking, Internet, and Web, which is a bit broad, but leads to Introduction to Stream Programming Guide for Cocoa, which in turn contains the chapter Setting Up Socket Streams.
Also keep in mind, OS X is a Unix platform, and Objective-C is a superset of C. This means you can eschew Cocoa entirely and use the BSD socket API directly using standard C syntax—meaning you can just Google "bsd socket tutorial" and you're off to the races.
The XCode installation comes with a ton of example code in the /Developer/Examples folder.
There are even more on the ADC site, such as GeekGameBoard.
Apple has a ton of them. Beginner tutorials are not going to have much to do with online games because they're for beginners.