Always keep the console window open when running (Menu > Run > Console)

Objective C is a dynamic typed language so the compiler doesn’t know if functions you use are actually available at compile time, but an error will be generated when it runs.  ALWAYS have the console window open so you see any errors occurring.