ios - 如何在 Xcode 中正确使用 iOS Runtime Headers?

标签 ios xcode runtime iphone-privateapi

如何正确使用 iOS runtime headers在 Xcode 中用于无法进入 App Store 而只是用于个人黑客攻击的应用程序?

例如,我是将框架复制到我的 Mac 上的 /System/Library 还是仅将所需的转储运行时 header 包含到我的 Xcode 项目中?如果是这样,我怎样才能使包含工作,因为包含时,我会收到大量错误消息。我在这里画了一个空白。

网上有一些东西,但没有明确说明。非常感谢详细的解释!

谢谢。

最佳答案

首先让我们从如何链接这些框架开始

假设您要使用 SpringBoardServices 框架

  1. 转到 https://github.com/nst/iOS-Runtime-Headers/并下载标题

  2. 搜索 SpringBoardServices.framework 文件夹并复制其中的所有 header

  3. 转到/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework 并创建一个名为 Headers

  4. 的文件夹

replace iPhoneOS.platform with iPhoneSimulator.platform an paste the headers in simulator SDK folder too if you want to try apps on the simulator

  1. 把刚刚复制的文件粘贴进去

Now you can link the SpringBoardServices Framework

现在如何使用SpringBoardServices

这将打开邮件应用程序

#include <SpringBoardServices/SpringBoardServices.h>
void openMailApp(){
    SBSLaunchApplicationWithIdentifier(CFSTR("com.apple.MobileMail"), false);
};

获取当前播放音乐使用的应用程序的名称

SBSCopyNowPlayingAppBundleIdentifier();

关于ios - 如何在 Xcode 中正确使用 iOS Runtime Headers?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33202719/

相关文章:

ios - 应用程序崩溃,+[SVGKImage imageWithSource :] 中的 *** 断言失败

XCode - 为什么我找不到文件?

iphone - HTTPS + ASIHTTPRequest 会被 App Store 批准吗?

xcode - #if 指令使 XCode 中的非事件分支变灰

java - 在运行时添加依赖于同一类中带有注释的方法的方法

c++ - 在运行时找出特定线程的CPU核心

android - 如何将 Microsoft Word 文件内容嵌入到 Flutter 应用程序中而不使用富文本重写

iphone - 从 HTML + UIWebView 下载视频

c++ - 降低构建大小

ios - 自定义 UI 导航栏和按钮