MCPcopy Create free account
hub / github.com/transistorsoft/react-native-background-geolocation / findProject

Function findProject

scripts/xcode-helpers.js:79–102  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

77
78// based on: https://github.com/facebook/react-native/blob/1490ab1/local-cli/core/ios/findProject.js
79function findProject(folder) {
80 const GLOB_PATTERN = '**/*.xcodeproj';
81 const TEST_PROJECTS = /test|example|sample/i;
82 const IOS_BASE = 'ios';
83 const GLOB_EXCLUDE_PATTERN = ['**/@(Pods|node_modules)/**'];
84
85 const projects = glob
86 .sync(GLOB_PATTERN, {
87 cwd: folder,
88 ignore: GLOB_EXCLUDE_PATTERN,
89 })
90 .filter(project => {
91 return path.dirname(project) === IOS_BASE || !TEST_PROJECTS.test(project);
92 })
93 .sort((projectA, projectB) => {
94 return path.dirname(projectA) === IOS_BASE ? -1 : 1;
95 });
96
97 if (projects.length === 0) {
98 return null;
99 }
100
101 return projects[0];
102};
103
104function addToFrameworkSearchPaths(project, path, recursive) {
105 eachBuildConfiguration(project, hasLCPlusPlus, config => {

Callers

nothing calls this directly

Calls 1

syncMethod · 0.65

Tested by

no test coverage detected