最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ios - Grant file access permissions between containing app and extension - Stack Overflow

programmeradmin1浏览0评论

I'm developing a File Provider extension for both iOS and macOS. I'm using [-NSFileProviderManager temporaryDirectoryURLWithError:] for a temporary storage location for various operations. Now, I want to clean up the dir after previous launches of application and it's extensions. However, I'm getting NSFileReadNoPermissionError while trying to access directories created by extension with container app and vice versa. At the same time, extension can access items created by other extension processes just fine, and, respectively, containing app can access files created by it's previous launches. Part of the problem is, I guess, is that the dir given by the OS has the form of /Users/CURRENT_USER/Library/Containers/CONTAINING_APP_BUNDLE_IDENTIFIER/Data/tmp, which is not inside application's group container. On the other hand, I don't have control over that's directory location.

So, the question is: is this a bug or there is an API which will allow application and it's extensions to grant file access to each other like it happens automagically inside the group container?

发布评论

评论列表(0)

  1. 暂无评论