简体   繁体   中英

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

iOS Simulator stores apps in ~/Library/Application Support/iPhone Simulator/4.2/Applications/APP_UUID/

But how do I find the APP_UUID for a specific Project/Target?

Go to

~/Library/Developer/CoreSimulator/Devices/ 

and type

find . -iname "*.app"

in a shell.

** Updated for Xcode 8 **

The easiest way I've found is to run the app in the simulator and NSLog the result of a standard path-locating function, like this one:

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

Here is what you need:

xcrun simctl get_app_container booted com.bundle.identifier

just change com.bundle.identifier to your app bundle identifier

Instead of having to remember these commands, a very simple and straightforward way is to simply:

  1. open top (or any activity manager)
  2. search for your application name

The location where your app is stored will be there

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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