Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 6b4354a

Browse files
tmaly1980alexandergoncharov-zz
authored andcommitted
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"
1 parent a81a045 commit 6b4354a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/postlink/ios/postlink.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = () => {
1212
console.log("Running ios postlink script");
1313

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

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

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

0 commit comments

Comments
 (0)