diff --git a/Tasks/XcodeV5/xcodeutils.ts b/Tasks/XcodeV5/xcodeutils.ts index 30278c48fd27..aff941a06c51 100644 --- a/Tasks/XcodeV5/xcodeutils.ts +++ b/Tasks/XcodeV5/xcodeutils.ts @@ -145,6 +145,13 @@ function getPbxProjectPath(workspace: string) { if (workspace && workspace.trim().toLowerCase().endsWith('.xcworkspace')) { let pbxProjectPath: string = workspace.trim().toLowerCase().replace('.xcworkspace', '.pbxproj'); + if (pathExistsAsFile(pbxProjectPath)) { + return pbxProjectPath; + } + + tl.debug("Corresponding pbxProject file doesn't exist: " + pbxProjectPath + ", checking alternative location"); + + pbxProjectPath = workspace.trim().toLowerCase().replace('.xcworkspace', '.xcodeproj/project.pbxproj'); if (pathExistsAsFile(pbxProjectPath)) { return pbxProjectPath; }