有个需求,是要app内只有下载的功能而没有浏览下载文件的功能,只能使用手机内的文件app,去查看下载的文件,而这个我找了很多文件都找不到有用的方法,最后还是老大给我找了一个链接。https://www.freesion.com/article/6123575026/ 就是这个,看完了这个我就明白了,只需要两个属性就可以的事情。
Application supports iTunes file sharing YES
Supports opening documents in place YES
只要在info.plst文件中加入这两个属性就可以了。
切记路径要存在
NSString *fullPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:response.suggestedFilename];
这个里面
完美