meyers8686 / plist

Automatically exported from code.google.com/p/plist
0 stars 0 forks source link

BinaryPropertyListParser does not parse appleId #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
File file = new File("iTunesMetadata.plist");
NSDictionary rootDict = (NSDictionary) PropertyListParser.parse(file);          

for (int i = 0; i < rootDict.allKeys().length; i++) {
                System.out.print(rootDict.allKeys()[i] + ": ");
                System.out.println(rootDict.objectForKey(rootDict.allKeys()[i]).toString());
}

What is the expected output? What do you see instead?
The output of the above for-loop should contain the appleId "tes@kabelmail.de". 
But this appleId is not listed.

What version of the product are you using? On what operating system?
plist-r7 and latest from public svn directory. Operating system is linux.

Original issue reported on code.google.com by mes...@googlemail.com on 1 Apr 2011 at 8:19

Attachments:

GoogleCodeExporter commented 9 years ago
The AppleID is in a sub-sub-dictionary, not in the main dictionary.  You need 
to look up the key com.apple.iTunesStore.downloadInfo in the dictionary you've 
got, cast the result to an NSDictionary, look up accountInfo in that 
dictionary, cast that result to an NSDictionary, then look up AppleID.

If you want to see all the data in your file and what keys you need to get to 
it, do "plutil -convert xml1 iTunesMetadata.plist -o -" on a Mac.

Original comment by keith.ra...@gmail.com on 8 Apr 2011 at 11:28

GoogleCodeExporter commented 9 years ago

Original comment by daniel.dreibrodt on 17 Apr 2011 at 5:32