【问题标题】:Re-launching a VOIP application from background mode using private API's使用私有 API 从后台模式重新启动 VOIP 应用程序
【发布时间】:2011-01-09 23:35:21
【问题描述】:

开始 - 此应用无需进入 App Store。

我正在考虑以下内容应该可行:

    mach_port_t *p;
void *uikit = dlopen(UIKITPATH, RTLD_LAZY);
int (*SBSSpringBoardServerPort)() = 
dlsym(uikit, "SBSSpringBoardServerPort");
p = (mach_port_t *)SBSSpringBoardServerPort(); 
dlclose(uikit);

void *sbserv = dlopen(SBSERVPATH, RTLD_LAZY);
int (*setAPMode)(mach_port_t* port, const char* appID, BOOL suspended, void* unknown, void* unknown2) = 
dlsym(sbserv, "SBSLaunchApplicationWithIdentifier");
setAPMode(p, "com.apple.weather", NO, nil, nil);
dlclose(sbserv);

但是我得到了 exc_bad_access,这可能是因为它需要一个身份验证令牌 - 不过我可能是错的。

或者我正在尝试使用以下内容:

Class $SBApplicationController=objc_getClass("SBApplicationController");

NSLog(@"[$SBApplicationController sharedInstance], %@", [$SBApplicationController sharedInstance]);

遗憾的是输出为空 - 所以我想这不能在应用程序中完成。

有什么想法吗?这让我发疯 - 谢谢!

【问题讨论】:

  • 你现在有什么解决办法吗?
  • @rhodesy22 你好,你能帮我如何使用 SBSSpringBoardServerPort 吗? here 是我的问题

标签: iphone api private iphone-privateapi


【解决方案1】:

iOS 沙盒会阻止或杀死任何不是由 iOS 启动的进程。

【讨论】:

  • 谢谢你,但是使用类似 SBSSpringBoardServerPort 方法的方法在技术上具有启动跳板服务操作,不是吗?我可以使用该方法调暗屏幕、锁定手机、打开飞行模式并暂停最重要的应用程序。
  • 2rhodesy22: SBSLaunchApplicationWithIdentifier 和其他类似的方法需要权利“com.apple.springboard.launchapplications”,这是跳板有而自定义应用程序没有的。
猜你喜欢
  • 2014-09-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-07-14
相关资源
最近更新 更多