Skip to content

Commit

Permalink
Update postlink.js (#1262)
Browse files Browse the repository at this point in the history
Fixing bug where CocoaPods files (ios/Pods/Pods.xcodeproj) causes error "Could not determine correct xcode proj path to retrieve related plist file, there are multiple xcodeproj under the solution"
  • Loading branch information
tmaly1980 authored and alexandergoncharov-zz committed May 8, 2018
1 parent a81a045 commit 6b4354a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/postlink/ios/postlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = () => {
console.log("Running ios postlink script");

var ignoreNodeModules = { ignore: "node_modules/**" };
var ignoreNodeModulesAndPods = { ignore: ["node_modules/**", "ios/Pods/**"] };
var appDelegatePaths = glob.sync("**/AppDelegate.+(mm|m)", ignoreNodeModules);

// Fix for https://github.com/Microsoft/react-native-code-push/issues/477
Expand Down Expand Up @@ -150,7 +151,7 @@ module.exports = () => {
}

function getPlistPath(){
var xcodeProjectPaths = glob.sync(`**/*.xcodeproj/project.pbxproj`, ignoreNodeModules);
var xcodeProjectPaths = glob.sync(`**/*.xcodeproj/project.pbxproj`, ignoreNodeModulesAndPods);
if (!xcodeProjectPaths){
return getDefaultPlistPath();
}
Expand Down Expand Up @@ -193,4 +194,4 @@ module.exports = () => {
//(see https://github.com/Microsoft/react-native-code-push/issues/534#issuecomment-302069326 for details)
return path.resolve(path.dirname(xcodeProjectPath), '..', plistPathValue.replace(/^"(.*)"$/, '$1'));
}
}
}

0 comments on commit 6b4354a

Please sign in to comment.