0

Ok I can get the list of IPA files in my iTunes folder. what I want to do is be able to read the plist file in the IPA file.

I'm very new to Objective-C so sorry if this is an obvious question (I did look).

I tried the following but it comes back null.

// i = NSURL. value eg. "file://localhost/Users/jiyeon/Desktop/test/test.ipa"
NSDictionary *plistInfo = [NSDictionary dictionaryWithContentsOfFile:[[i absoluteString] 
                           stringByAppendingPathComponent:@"iTunesMetadata.plist"]];

However plistInfo just ends up being null.

Jiyeon
  • 153
  • 2
  • 2
  • 7

1 Answers1

2

Try -(NSString *)path NSURL

NSDictionary *plistInfo = [NSDictionary dictionaryWithContentsOfFile:[[i path] 
                       stringByAppendingPathComponent:@"iTunesMetadata.plist"]];

this should work

Martin Brugger
  • 3,168
  • 26
  • 20
  • Nope that doesn't work either. :/ I think I am mega-newbie on this. The IPA file appears to be a zip (and plist file is in that). I tried NSBundle on it as well but that doesn't work. Is there a command for reading zips? If extract then I can just access directly. – Jiyeon Apr 26 '11 at 17:33
  • 1
    You need to extract the file first. Take a look at http://stackoverflow.com/questions/1230351/is-there-any-zip-decompression-for-iphone – Martin Brugger Apr 26 '11 at 18:20