Update postlink.js (#1262)

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"
This commit is contained in:
Tomas Maly
2018-05-08 04:14:47 -07:00
committed by Alexander Goncharov
parent a81a0452f4
commit 6b4354ad8e

View File

@@ -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
@@ -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();
}
@@ -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'));
}
}
}