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

喜你入骨 提交于 2019-11-28 08:12:37

问题


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?


回答1:


Go to

~/Library/Developer/CoreSimulator/Devices/ 

and type

find . -iname "*.app"

in a shell.

** Updated for Xcode 8 **




回答2:


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



回答3:


Here is what you need:

xcrun simctl get_app_container booted com.bundle.identifier

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

  • https://medium.com/@ankitkumargupta/ios-simulator-command-line-tricks-ee58054d30f4
  • https://nshipster.com/simctl/


来源:https://stackoverflow.com/questions/6861024/how-do-i-find-the-app-uuid-in-xcode-for-an-ios-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!