开发者

Is NSUserDefaults the correct place to store a list of favorites?

开发者 https://www.devze.com 2023-01-09 11:26 出处:网络
I am programming an app for iOS, allowing the user to make connections via tcp/ip. The user is able to save a server as a favorite. To make this possible I am serialising the server object and storing

I am programming an app for iOS, allowing the user to make connections via tcp/ip. The user is able to save a server as a favorite. To make this possible I am serialising the server object and storing it to the NSUserDefaults.

Is this the correct way to go or should I rather sa开发者_如何学编程ve the serialised object to the file system?

Thanks, Mark.


NSUserDefaults' data is also stored on the filesystem.
Don't try to re-invent the wheel. It's here on purpose, and it's very easy and convenient to use. : )

0

精彩评论

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

关注公众号