osx fixes and xcode example