如何将数据保存到用户的应用程序支持? [英] How to save data into the User's Application Support?

查看:127
本文介绍了如何将数据保存到用户的应用程序支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将一些XML格式的数据保存到应用程序支持文件夹,但我不知道如何做。

I want to save some XML formatted data into the Application Support folder, but I have no idea how to do that.

有人知道任何教学教程如何将数据保存到Application Support文件夹以及如何创建XML文件?

Does anyone know any tutorials for teaching you how to save data into the Application Support folder and how to create an XML file?

推荐答案

根据数据的种类,最简单的是将一个NSDictionary写入plist格式。如果没有,且不能是NSDictionary,请查看 NSXMLDocument。

Depending on the kind of data, the simplest is to write an NSDictionary to plist format. If it's not and can't be an NSDictionary, look at NSXMLDocument.

应用程式支援资料夹使用 NSSearchPathForDirectoriesInDomains

Application Support folder is best located using NSSearchPathForDirectoriesInDomains

HTH

这篇关于如何将数据保存到用户的应用程序支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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