开发者

How can I read the iTunesMetadata.plist in Objective-C? (ipa file is on disk)

开发者 https://www.devze.com 2023-03-01 00:46 出处:网络
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.

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.plis开发者_运维百科t"]];

However plistInfo just ends up being null.


Try -(NSString *)path NSURL

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

this should work

0

精彩评论

暂无评论...
验证码 换一张
取 消