将二进制plist读入NSDictionary [英] Read binary plist into NSDictionary

查看:127
本文介绍了将二进制plist读入NSDictionary的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有简单的方法可以将二进制plist文件解析为NSDictionary表示形式? 我正在搜索类似的内容:

Is there simple way to parse the binary plist file into the NSDictionary representation? I am searching something like that:

NSString* strings = [NSString stringWithContentsOfURL: ... encoding: NSUnicodeStringEncoding error: ...];
NSMutableDictionary* pairs = (NSMutableDictionary*)[strings propertyListFromStringsFileFormat];

使用此代码在解析二进制plist文件时导致异常.

Using this code caused the exception while parsing the binary plist file.

推荐答案

您在寻找[NSDictionary dictionaryWithContentsOfFile:]吗?

这篇关于将二进制plist读入NSDictionary的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆