开发者

Iphone - Could root.plist be referenced from another package?

开发者 https://www.devze.com 2023-03-24 15:28 出处:网络
I am a complete iOS development newbie. I am working on cre开发者_StackOverflow社区ating an SDK which will store preferences by the user. I need for the root.plist file be inside the SDK if possible,

I am a complete iOS development newbie. I am working on cre开发者_StackOverflow社区ating an SDK which will store preferences by the user. I need for the root.plist file be inside the SDK if possible, and to write methods for the settings from the actual app.


The Foundation.framework already has a class that manages saving native Cocoa objects to a property list, called NSUserDefaults.

NSUserDefaults Class Reference

It allows you to save NSStrings, NSNumbers, NSArrays, NSDictionarys, NSData, etc. without having to worry about serializing the objects, as long as everything is either a native Cocoa object, or pre-serialized to NSData.

If this is what you are trying to do, then I would find something else you can include in your library that would differentiate it from this class; otherwise you would just be replicating existing classes.

0

精彩评论

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

关注公众号