开发者

How to access and use the "plist version" information in a Property List file

I'm currently using *.plist files for my iPhone app to st开发者_C百科ore information that is later read into strings as NSArray or NSDictionary equivalents. I will be updating these files periodically and downloading them to the application if a new version is found. I would like to use the <plist version="1.0"> string located in each *.plist file to make these comparisons since it won't interfere with the actual content of the plist file.

My question: is it possible to access this information and use it in the manner I describe, or is this version information describing the version of the *.plist protocol and not the actual file itself? For example, can I change this to: <plist version="1.1"> for a new version of the file, read this version info and update the file if newer? If this is possible, I haven't found a way to extract this information using the iPhone SDK (the comparison and update part will be easy).


I'm pretty sure you should'nt touch that. It's probably used by apple for future-compability (or future backwards compability, if you prefer). So that if/when they change the syntax of plists, old ones will still work.

Easiest would be to have the first entry contain the version number, or possible as a part of the file name. Or maybe even at a completetley different place, like in a database or as a part of a file structure on the server.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜