using System; using System.Collections.Generic; using System.IO; namespace Azerion.BlueStack.Editor.iOS.PodDependency { public class PodDependencyUtils { public static DependencyCheckResult CheckPodDependencies(string podFilePath, List dependencies) { String[] podLines = File.ReadAllLines(podFilePath); var isFound = false; var missingDependency = ""; foreach (Dependency dependency in dependencies) { isFound = false; foreach (string line in podLines) { if (line.Contains(dependency.Name) && line.Contains(dependency.Version) && line.Trim().StartsWith("pod")) { isFound = true; } } if (!isFound) { break; } } if (!isFound) { return new DependencyCheckResult(true, missingDependency + " dependency is missing in your 'Pod File'"); } return new DependencyCheckResult(false, ""); } } }