update xcode project and fixed some bugs…