2012-09-05 140 views
0

我嘗試瞭解如何從iPhone應用程序查看應用程序目錄。有沒有辦法在xcode中查看我的應用程序的文件夾結構?如何從iPhone應用程序查看應用程序目錄

感謝您的任何提示。

+0

因此,您想知道您的應用在您的設備或模擬器上安裝時的樣子嗎?或者你想在你的應用中顯示它,你需要一個API來做到這一點? –

+0

請進一步解釋。 –

回答

1

只是要嘗試回答。怎麼樣記錄,就像這樣:

//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中的位置

enter image description here

+0

非常感謝! – Chris

+0

沒問題,這裏幫忙:) – Bazinga

1

你必須在你的模擬器上運行它,然後去檢查的文件夾:

~/Library/Application Support/iPhone Simulator/ 

將有適用於iOS的每一個版本的工作所需的子文件夾。進入你正在使用的當前版本的iOS文件夾,並且會有一個名爲Applications的子文件夾,並且裏面會有很多子名稱不合的子文件夾。檢查逐一直到找到包含您的應用程序:)

2

你可以看到一個包程序(.APP)之一:

  1. 按Ctrl +點擊在Project Navigator在Xcode的.app。
  2. 選擇 「在Finder中顯示」 在Finder中
  3. 按Ctrl +單擊.app文件
  4. 選擇 「顯示包內容」
0

你必須首先將項目歸檔:

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會告訴你appstore上的應用有多大。實際尺寸如果與顯示的一樣大一半。