在模拟器上运行应用程序时,它会在 Mac 上创建一个文件夹,以将应用程序数据包含在“文档”文件夹中。当您从模拟器中删除应用程序或将某些应用程序设置更改为 XCode 时,此文件夹会发生更改。当您拥有数十个应用程序时,手动找到好的应用程序就是一场噩梦。
有办法轻松访问此文件夹吗?
最佳答案
我只是想尝试回答一下。像这样记录它怎么样:
//App Directory & Directory Contents
NSString *appFolderPath = [[NSBundle mainBundle] resourcePath];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSLog(@"App Directory is: %@", appFolderPath);
NSLog(@"Directory Contents:\n%@", [fileManager directoryContentsAtPath: appFolderPath]);
关于iphone - XCode 4 - 轻松访问安装到模拟器上的应用程序的 "Documents"文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11413847/