code: function findProject(folder) {
      const GLOB_PATTERN = '**/*.xcodeproj';
      const TEST_PROJECTS = /test|example|sample/i;
      const IOS_BASE = 'ios';
      const GLOB_EXCLUDE_PATTERN = ['**/@(Pods|node_modules)/**'];
  
      const projects = glob
          .sync(GLOB_PATTERN, {
              cwd: folder,
              ignore: GLOB_EXCLUDE_PATTERN,
          })
          .filter(project => {
              return path.dirname(project) === IOS_BASE || !TEST_PROJECTS.test(project);
          })
          .sort((projectA, projectB) => {
              return path.dirname(projectA) === IOS_BASE ? -1 : 1;
          });
    
      if (projects.length === 0) {
          return null;
      }
    
      return projects[0];
  }
docs: based on: https://github.com/facebook/react-native/blob/1490ab1/local-cli/core/ios/findProject.js