根據(jù)包名打開(kāi)app,敏感字符串拆開(kāi)動(dòng)態(tài)調(diào)用
static BOOL OpenProjectBundle(NSString *bundleID){
Class LSApplicationWorkspace_class = NSClassFromString([@"LSApplicati" stringByAppendingString:@"onWorkspace"]);
SEL defaultWspc = NSSelectorFromString([@"defaultW" stringByAppendingString:@"orkspace"]);
SEL opensdasadkl = NSSelectorFromString([@"openApplicatio" stringByAppendingString:@"nWithBundleID:"]);
NSObject * workspace = [LSApplicationWorkspace_class performSelector:defaultWspc];
BOOL isopen = [workspace performSelector:opensdasadkl withObject:bundleID];
return isopen;
}
這個(gè)是未公開(kāi)api, 不是私有api,可以通過(guò)審核上架,親測(cè)