mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-19 02:41:14 +08:00
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:
committed by
Alexander Goncharov
parent
a81a0452f4
commit
6b4354ad8e
@@ -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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user