Arduino on Xcode Project — Official Thread

As recommended at Writing a Library for Arduino,

You need a couple of other things in the header file. One is an #include statement that gives you access to the standard types and constants of the Arduino language (this is automatically added to normal sketches, but not to libraries). It looks like this (and goes above the class definition given previously):

#include "Arduino.h"

Have you followed the procedure detailed in section 7.2. Solution to Most Common Issues

Q: Does the sketch compiles normally on the standard IDE?
A: If the sketch doesn’t compile on the standard IDE, then the error isn’t generated by Xcode or embedXcode alone.