Is an iPhone app's document directory /var/mobile/Documents or /var/mobile/Library/AppName?

后端 未结 7 709
小蘑菇
小蘑菇 2020-12-21 00:34

As far as I know (and read everywhere) an application\'s documents directory should be somewhere in /var/mobile/Library/ on the iPhone but if I\'m logging the g

相关标签:
7条回答
  • 2020-12-21 01:16

    Use your bundle ID as a name, for example com.companyname.appname.Settings.xml. They are rarely the same in different apps. Also you may use UUIDs to name your file and store the UUID that's in the name in the application bundle, but it has its pros and cons: Pro: File never gets overwritten by another app Con: It will be tricky to do such thing.

    0 讨论(0)
提交回复
热议问题