Frequently Asked Questions
People ask these questions a lot. If you have a question, look here first, chances are you'll find the answer.
You may also be interested in the list of Infrequently Asked Questions. People don't ask those so much but there is still good information there.
- Where are the channel rules?
Thanks for asking! You can find the rules here.
- Where do I get Xcode?
Go to the Apple Developer Connection Member Site and sign in. If you don't have an account, sign up for a free one.
- Where do I get gcc?
gcc comes as part of the Xcode install, so see question #1.
- How can I get gcc without installing 1GB of Xcode crap?
You don't. Oh, you probably can, but it's hard and unsupported. Go for it if you want, but don't expect us to help. NOTE: The osx-gcc-installer project might be a good starting point
- I can't print.
That is not a development question! Yes, we know things that the people in #macosx do not, but we also don't appreciate random people barging in and expecting us to help us fix their system. For basic troubleshooting, log out, reboot, reinstall. Ask for help if you like, but we will feel 100% guilt-free about completely ignoring you.
- Can you help me with this PHP code?
Can you help me compile GNU Foo on Ubuntu?
The answer to this one is pretty much the same as the last one. This may be a development question but it's not a Mac question! Once again, ask for help, but you'll probably be ignored and you're definitely in the wrong place.
- Why doesn't my app work?
You'll have to ask a better question than that. Remember that we can't read your mind and we don't know what you're doing. For best results, read and follow the guidelines discussed in Getting Answers.
- Can I ask a question?
Yes! Don't ask if you can ask, and don't ask if anyone is awake (unless you have a very specific problem; asking if there are any Carbon or Cocoa gurus around is worthless), just ask your question. If people want to answer then they will.
- Why are you guys so mean?
You probably did something to annoy us. Behaviors to avoid include:
- Asking if you can ask (see above FAQ entry).
- Repeating your question several times in the space of a few hours. If nobody knew the answer the first time, probably nobody will know the answer the second time.
- Being demanding. We're in here for our own personal enjoyment. We do not get paid for any of this. Set your expectations for help accordingly.
- Making us guess. See Getting Answers. In short, if you lay out your problem badly and make us waste half an hour just extracting the info we need to give you your answer, you are likely to make us unhappy.
- Remember, this channel is dedicated to discussion about Mac development, not help. We sometimes help people but it is not our mission. Keep this in mind.
- I know it sucks, but it's not my code!
It is now. If you're working on it then from our point of view it's yours. If it's doing something stupid, expect to get (hopefully constructive) criticism. We don't accept lame excuses for bad code and neither should you.
- I'm trying to pound a nail, should I use an old shoe or a glass bottle?
Thanks to Alex Papadimoulis for the inspiration for this question.
- The glass bottle will work best if you're pounding the nail into something soft like drywall. However it will shatter with something like hardwood, so you should use the old shoe for those.
- Your entire approach is wrong. You're using the wrong tools for the job. Go get a hammer. Even if you don't know how to use a hammer, it is time to obtain one and learn it.
- Is there a pastebot?
Why did I get kicked off the channel just for pasting a bunch of code?
Our pastebot is lisppaste, and you can paste things to it by going to http://paste.lisp.org/new/macdev. You got kicked off because we don't enjoy having the channel flooded with many lines of code. If you need to show somebody code, use the bot. This holds true even if you just have a couple lines of code. Sometimes even with just one line it's a good idea; it's a pain to scroll back and forth to refer to the code and then discuss it.
- Cocoa or Carbon?
This question is the stuff of flame wars. The merits of each are tricky and subjective. However as of Leopard, Cocoa got support for 64-bit GUI apps whereas Carbon support was explicitly dropped by Apple. They are both fully supported in 32-bit land, but the writing seems to be on the wall that Carbon is not quite as loved as it once was. Unless you have a legacy Carbon codebase to deal with, you should probably go for Cocoa.
- How does Cocoa memory management work?
Why does my Cocoa code leak?
My Cocoa app crashes with EXC_BAD_ACCESS, what do I do?
You made a memory management error. Read through Hold Me, Use Me, Free Me and CocoaDev: MemoryManagement to understand basic principles, and CocoaDev: NSZombieEnabled for how to track them down if you still can't find your error.
- I get a "unrecognized selector" error, or an exception is thrown, how can I find out why?
See the section called "Breaking on Exceptions" in CocoaDev's DebuggingTechniques page.
- Why don't my Cocoa objects get deallocated when my application terminates?
This is done by design. When an application terminates on OS X, all of its memory is automatically reclaimed by the operating system. Explicitly deallocating memory in the application just before termination is redundant and inefficient, so Cocoa doesn't do it. This won't cause a memory leak or any other problems unless you rely on your
-dealloc method to be invoked in order to clean up some non-memory resources. If this is the case, you should use the
NSApplicationWillTerminateNotification notification to explicitly clean up those resources rather than relying on
- How do I fix some strange error that has nothing to do with ZeroLink?
What do I do about a ZeroLink error?
Why does my program compile in Debug but not Release mode?
Why does my program not run on other computers?
Disable ZeroLink! ZeroLink is a horrible piece of technology that should never be used. It frequently causes errors which appear to have absolutely no link to ZeroLink. It provides no benefit and lots of pain. If your program works with ZeroLink and fails without it, that just means that you have an error that ZeroLink is hiding. You can disable ZeroLink for a single target or project in Xcode by unchecking the appropriate box in your build settings, or you can disable it globally by unchecking Allow ZeroLink under the Build menu. If you fail to take this advice and insist on trying to make your program work with ZeroLink enabled, don't expect any help from us.
- I have a problem with my AppleScript, can you help?
Probably not. AppleScript is a crappy language that makes it hard to do almost anything. If your AppleScript code is more than a few lines then you're already going beyond what it's good at. Learn a real language: it's harder to start with and it takes time to learn, but in the end you'll be solving more problems and solving them faster.
- How do I do iPhone development?
This is off-topic for #macdev. Yes, the iPhone is made by Apple, and so are Macs, but the channel is only for Mac development. Please direct iPhone development discussion to #iphonedev