开发者

iOS Documents with UIFileSharingEnabled

开发者 https://www.devze.com 2023-02-28 14:10 出处:网络
My iPhone app uses a sqlite3 database for storing the data that it generates.This data needs to persist, and I need to make sure the user cannot damage it.I also want to allow the user to export data

My iPhone app uses a sqlite3 database for storing the data that it generates. This data needs to persist, and I need to make sure the user cannot damage it. I also want to allow the user to export data as text/csv files, these would be shared through iTunes. I plan to put the database in the Library folder, write the CSV files to the Doucments folder, and turn on UIFileSharingEnabled.

Is there anyway I can stop the user from adding files to my apps Documents directory through iTunes?

If not, it is acceptable practi开发者_开发问答ce to have my app delete any files that it did not create?


Is there anyway I can stop the user from adding files to my apps Documents directory through iTunes?

No

If not, it is acceptable practice to have my app delete any files that it did not create?

Of course not. Why do you want to do this anyway? If you use the documents directory for exporting only, simply ignore anything that's inside.

0

精彩评论

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

关注公众号