[英]Can I access the contents of a shared container on my iOS device?
How can we see the contents of the shared app group container of my iOS application on my iPad. 我们如何在iPad上查看我的iOS应用程序的共享应用程序组容器的内容。 I have tried locating the app container from the Organizer, but the shared app group container (of identifier group.com.company.xxx) was not there in the directory contents.
我尝试从管理器中找到应用程序容器,但是目录内容中没有共享的应用程序组容器(标识符为group.com.company.xxx)。
Example code for generating URL for stored container: 用于为存储的容器生成URL的示例代码:
NSURL *containerURL = [[NSFileManager defaultManager]
containerURLForSecurityApplicationGroupIdentifier:@"group.com.me.myapp"];
NSURL *storeURL = [containerURL URLByAppendingPathComponent:@"data.sqlite"];
You code should be like this. 您的代码应该是这样的。
NSURL *containerURL = [[NSFileManager defaultManager]
containerURLForSecurityApplicationGroupIdentifier:@"group.com.me.myapp"];
NSString *storeURL = [[containerURL path] stringByAppendingPathComponent:@"data.sqlite"];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.