Xcode: directory file for simulator Iphone

后端 未结 8 1115
[愿得一人]
[愿得一人] 2021-01-30 03:25

i want to write a string in a file \"file.txt\": this file in my project (for Iphone) is inside Resources; I try to write a string in this file but it don\'t work, I show my cod

8条回答
  •  终归单人心
    2021-01-30 04:16

    In gdb, stop process and paste it, then the location of Documents will be printed. [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]

     po [[[NSFileManager defaultManager] URLsForDirectory:9 inDomains:1] lastObject]
    

提交回复
热议问题