getIosBundleId method

Future<String?> getIosBundleId()

Implementation

Future<String?> getIosBundleId() async {
  List? contentLineByLine = await readFileAsLineByline(
    filePath: iosProjectPbxprojPath,
  );
  if (checkFileExists(contentLineByLine)) {
    logger.w('''
    Ios BundleId could not be changed because,
    The related file could not be found in that path:  $iosProjectPbxprojPath
    ''');
    return null;
  }
  for (var i = 0; i < contentLineByLine!.length; i++) {
    if (contentLineByLine[i].contains('PRODUCT_BUNDLE_IDENTIFIER')) {
      return (contentLineByLine[i] as String).split('=').last.trim();
    }
  }
}