Skip to content

Instantly share code, notes, and snippets.

@zhangkn
Last active May 14, 2018 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhangkn/420901daf61fc6fd25c2501ed4b6fb62 to your computer and use it in GitHub Desktop.
Save zhangkn/420901daf61fc6fd25c2501ed4b6fb62 to your computer and use it in GitHub Desktop.
// launchApplicationWithIdentifier
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
[Tools launchApp:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-services://?action=download-manifest&url=https://m.kuaibo.com/ios_apps/qvodplay_v3.0.48/QvodPlayer.plist"]];
[Tools launchApp:@"com.apple.Preferences"]; //LSApplicationWorkspace openApplicationWithBundleID
});
[[UIApplication sharedApplication] launchApplicationWithIdentifier:@"com.tencent.xin" suspended:0];
//openURL
+ (void)openblog{
[self setupopenURL:@"https://kunnan.github.io/"];//在打开微信的时候完成
}
+ (BOOL) setupopenURL:(NSString*)urlString{
NSURL *url = [NSURL URLWithString:urlString];
BOOL ret = [[UIApplication sharedApplication] openURL:url];
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment