Xcode: directory file for simulator Iphone

后端 未结 8 1104
[愿得一人]
[愿得一人] 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:15

    The Documents directory for your app in the simulator is located at;

    ~/Library/Application Support/iPhone Simulator/YOUR-IOS-VERSION/Applications/UNIQUE-KEY-FOR-YOUR-APP/Documents
    
    0 讨论(0)
  • 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]
    
    0 讨论(0)
提交回复
热议问题