findPodfile static method

File? findPodfile(
  1. String projectPath,
  2. ProjectType projectType
)

Find Podfile for iOS/Flutter projects

Implementation

static File? findPodfile(String projectPath, ProjectType projectType) {
  if (projectType == ProjectType.flutter) {
    final podfilePath = path.join(projectPath, 'ios', 'Podfile');
    final file = File(podfilePath);
    if (file.existsSync()) return file;
  } else if (projectType == ProjectType.ios) {
    final podfilePath = path.join(projectPath, 'Podfile');
    final file = File(podfilePath);
    if (file.existsSync()) return file;
  }
  return null;
}