/// 通過 bundle identifier 跳轉(zhuǎn)到其他App
+ (BOOL)openAppWithBundleId:(NSString*)bundleId {
? ? // 獲取私有類名(LSApplicationWorkspace通過字符串拼接形式可繞過蘋果審核??)
? ? NSString *classNameString = [[NSString alloc] initWithFormat:@"%@%@", @"LSApplicati", @"onWorkspace"];
? ? NSObject* workspace = [NSClassFromString(classNameString) new];
? ? // 獲取私有方法名
? ? NSString *selNameString = [[NSString alloc] initWithFormat:@"%@%@", @"openApplication", @"WithBundleID:"];
? ? SEL?selector =NSSelectorFromString(selNameString);
? ? IMP?imp = [workspace methodForSelector:selector];
? ? BOOL?(*func)(id,SEL,NSString*) = (void*)imp;
? ? BOOL?result = workspace ?
? ? func(workspace, selector, bundleId) :?false;
? ? return?result;
}