美文网首页
通过Bundle Identifier唤醒APP

通过Bundle Identifier唤醒APP

作者: 枫叶情结 | 来源:发表于2019-01-17 17:57 被阅读8次

导入头文件#import <objc/runtime.h>

  Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
  NSObject * workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];
  BOOL isopen = [workspace performSelector:@selector(openApplicationWithBundleID:) withObject:@"要唤醒的APP Bundle Identifier"];//可以从ipa包的info.plist文件中获取

相关文章

网友评论

      本文标题:通过Bundle Identifier唤醒APP

      本文链接:https://www.haomeiwen.com/subject/bztwdqtx.html