/// <summary> /// All installed provisioning profiles, sorted by newest first. /// </returns> public static IList<MobileProvision> GetAllInstalledProvisions (bool includeExpired) { if (!Directory.Exists (ProfileDirectory)) return new MobileProvision[0]; DateTime now = DateTime.Now; var list = new List<MobileProvision> (); var uuids = new HashSet<string> (); foreach (FilePath file in Directory.GetFiles (ProfileDirectory, "*.mobileprovision")) { var m = new MobileProvision (); try { m.Load (file); if (includeExpired || m.ExpirationDate > now) if (uuids.Add (m.Uuid)) list.Add (m); } catch (Exception ex) { LoggingService.LogWarning ("Error reading iPhone mobile provision file '" + file +"'", ex); } } //newest first list.Sort ((x,y) => y.CreationDate.CompareTo (x.CreationDate)); return list; }
/// <summary> /// All installed provisioning profiles, sorted by newest first. /// </returns> public static IList <MobileProvision> GetAllInstalledProvisions(bool includeExpired) { if (!Directory.Exists(ProfileDirectory)) { return(new MobileProvision[0]); } DateTime now = DateTime.Now; var list = new List <MobileProvision> (); var uuids = new HashSet <string> (); foreach (FilePath file in Directory.GetFiles(ProfileDirectory, "*.mobileprovision")) { var m = new MobileProvision(); try { m.Load(file); if (includeExpired || m.ExpirationDate > now) { if (uuids.Add(m.Uuid)) { list.Add(m); } } } catch (Exception ex) { LoggingService.LogWarning("Error reading iPhone mobile provision file '" + file + "'", ex); } } //newest first list.Sort((x, y) => y.CreationDate.CompareTo(x.CreationDate)); return(list); }
public static MobileProvision LoadFromFile(string fileName) { var m = new MobileProvision(); m.Load(fileName); return(m); }
public static MobileProvision LoadFromFile (string fileName) { var m = new MobileProvision (); m.Load (fileName); return m; }