如何在Objective-C中读取iTunesMetadata.plist? (ipa文件在磁盘上) [英] How can I read the iTunesMetadata.plist in Objective-C? (ipa file is on disk)
本文介绍了如何在Objective-C中读取iTunesMetadata.plist? (ipa文件在磁盘上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,我可以在iTunes文件夹中获取IPA文件列表.我想做的是能够读取IPA文件中的plist文件.
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.
我对Objective-C还是很陌生,所以很抱歉,如果这是一个明显的问题(我确实看过).
I'm very new to Objective-C so sorry if this is an obvious question (I did look).
我尝试了以下操作,但返回的结果为null.
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"]];
但是plistInfo最终只是为null.
However plistInfo just ends up being null.
推荐答案
Try -(NSString *)path NSURL
NSDictionary *plistInfo = [NSDictionary dictionaryWithContentsOfFile:[[i path]
stringByAppendingPathComponent:@"iTunesMetadata.plist"]];
这应该有效
这篇关于如何在Objective-C中读取iTunesMetadata.plist? (ipa文件在磁盘上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文