findXCConfigurationList static method

dynamic findXCConfigurationList(
  1. dynamic element,
  2. String targetName
)

Implementation

static dynamic findXCConfigurationList(dynamic element, String targetName) {
  List<dynamic> results = [];
  try {
    if (element is CommentPbx || element is MapEntryPbx) {
      return results;
    }
    for (var v in element.childrenList) {
      if (v.comment == "Build configuration list for PBXNativeTarget \"$targetName\"") {
        results.add(v);
      }
      if (v.childrenList.isNotEmpty) {
        results.addAll(findXCConfigurationList(v, targetName));
      }
    }
  } catch (e) {
    // Handle the case where childrenList is not available
  }
  return results;
}