From 6b4354ad8eb4c9ac30d6c6e8dd90dbb369d5a3c7 Mon Sep 17 00:00:00 2001 From: Tomas Maly Date: Tue, 8 May 2018 04:14:47 -0700 Subject: [PATCH] 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" --- scripts/postlink/ios/postlink.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/postlink/ios/postlink.js b/scripts/postlink/ios/postlink.js index 54037429a..fe9f03d12 100644 --- a/scripts/postlink/ios/postlink.js +++ b/scripts/postlink/ios/postlink.js @@ -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')); } -} \ No newline at end of file +}