iOS 9 read file permission

前端 未结 4 1103
谎友^
谎友^ 2020-12-20 15:16

In iOS 9+ I get a nil on any attempt to read from file. The file in this case is a image file path.
using

NSData(contentsOfFile: stringpath, options: NSD         


        
4条回答
  •  轮回少年
    2020-12-20 16:11

    You are most likely getting this error, because iOS apps only have access to files within its sandbox. See Apple documentation on file systems for details.

提交回复
热议问题