Added support for Xcode
Conditional code depending on if iOS or OSX
Merge pull request #2 from mattiaslevin/master

Support both OSX and iOS platform