繁体   English   中英

如何从iPhone应用程序查看应用程序目录

[英]How to view the app directory from iphone app

我尝试找出如何从iPhone应用程序查看应用程序目录。 有没有办法在xcode中查看我的应用程序的文件夹结构?

感谢您的任何提示。

您可以看到一个捆绑包(.app):

  1. Ctrl +在Xcode的项目浏览器中单击.app。
  2. 选择“在Finder中显示”
  3. Ctrl +在Finder中单击.app文件
  4. 选择“显示包装内容”

您必须在模拟器中运行它,然后检查文件夹:

~/Library/Application Support/iPhone Simulator/

您使用过的每个iOS版本都有一个子文件夹。 进入您正在使用的当前版本的iOS文件夹,其中将有一个名为Applications的子文件夹,并且其中有许多带有奇怪名称的子文件夹。 逐一检查它们,直到找到包含您的应用程序的一个:)

只是要尝试回答。 如何记录它,像这样:

    //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]);

要么

Xcode内部:

  • 窗口>组织者>项目
  • 选择项目
  • “派生数据”有一个小箭头,它将显示Finder中的位置

在此处输入图片说明

您必须先存档您的项目:

Select the device instead of the simulator (you don't have to plug a device in first).
Go to: Product -> Archive.
Open your Organizer (right upper corner).
Go to the Archive and right-click on your archived project, click on "Show in Finder".

在组织者中,选择项目后,xcode会告诉您该应用在应用商店中的大小。 实际大小是显示大小的一半。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM