簡體   English   中英

如何在 Xcode 中為 iOS 應用程序找到 APP_UUID?

[英]How do I find the APP_UUID in Xcode for an iOS App?

iOS Simulator 將應用程序存儲在 ~/Library/Application Support/iPhone Simulator/4.2/Applications/APP_UUID/

但是如何找到特定項目/目標的 APP_UUID?

~/Library/Developer/CoreSimulator/Devices/ 

並輸入

find . -iname "*.app"

在一個殼里。

** 針對 Xcode 8 更新 **

我發現的最簡單的方法是在模擬器中運行應用程序並 NSLog 標准路徑定位函數的結果,如下所示:

- (NSString *)applicationDocumentsDirectory {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, 
                                                         NSUserDomainMask, 
                                                         YES);
    NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
    return basePath;
}

// elsewhere, like in -application:didFinishLaunching:withOptions:
NSLog(@"app doc directory: %@", [self applicationDocumentsDirectory]);

這是您需要的:

xcrun simctl get_app_container booted com.bundle.identifier

只需將com.bundle.identifier更改為您的應用程序包標識符

不必記住這些命令,一個非常簡單直接的方法是:

  1. top (或任何活動管理器)
  2. 搜索您的應用程序名稱

存儲您的應用程序的位置將在那里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM