public static readPlist ( Stream stream, plistType type ) : object | ||
stream | Stream | |
type | plistType | |
Результат | object |
public static Dictionary <string, object> ParseInfo(string ipaPath, string plistPath, params string[] keys) { Dictionary <string, object> list = new Dictionary <string, object>(); HashSet <string> HashKeys = new HashSet <string>(keys); byte[] buff = ParsePlist(ipaPath); if (!string.IsNullOrEmpty(plistPath)) { File.WriteAllBytes(plistPath, buff); } Dictionary <string, object> p = Plist.readPlist(buff) as Dictionary <string, object>; if (HashKeys.Count == 0) { return(p); } else { foreach (var item in p) { if (HashKeys.Contains(item.Key)) { list.Add(item.Key, item.Value); } } } return(list); }
public static void Convert2BinPlist(string plistPath, string xmlPath) { object p = Plist.readPlist(plistPath); Plist.writeBinary(p, xmlPath); }