Add Xcode project file.

1. fix some semantic issue
2. add xcode project.