How to hide folders created in Document Directory in ios?

后端 未结 2 1887
暖寄归人
暖寄归人 2020-12-18 01:19

I have created some PDF files programatically, which i am storing into the devices memory using the following code >>>>

    NSString *fileName = [NSString s         


        
2条回答
  •  囚心锁ツ
    2020-12-18 01:53

    Just prefix the filename with a dot, as in .SampleTextFile.pdf.

    But the real solution is to not store the document in the NSDocumentDirectory in the first place. You should create subdirectory in the NSLibraryDirectory and store this stuff there. It also gets backed up and will not get purged like Caches and tmp, but the user cannot access it with iTunes.

提交回复
热议问题