updated xcode logic