NSMutableArray *defaultWorkspaceApps =[[NSClassFromString(@“LSApplicationWorkspace”) defaultWorkspace] applicationsOfType:0];
for (LSApplicationProxy *app in defaultWorkspaceApps) {
if([app.bundleIdentifier containsString:@“com.my.bundleIdentifier”])
{
NSURL * resourcesDirectoryURL = [app performSelector:NSSelectorFromString(@“containerURL”)];
NSString* path=[resourcesDirectoryURL absoluteString];
path=[str stringByReplacingOccurrencesOfString:@“file://” withString:@“”];//路径
}
}