xcode 如何为越狱的 iPhone 创建一个调整

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6405608/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:18:08  来源:igfitidea点击:

How to create a tweak for jailbroken iPhone

iphonexcodejailbreaktweak

提问by paul_1991

My question is... Can we use Xcode to create a tweak for jailbreaked iPhone? Foe example if I want to add some button in the lock screen how can I do? How can I mod the GUI of the default iPhone applications?

我的问题是...我们可以使用 Xcode 为越狱的 iPhone 创建一个调整吗?例如,如果我想在锁定屏幕中添加一些按钮,我该怎么办?如何修改默认 iPhone 应用程序的 GUI?

回答by Dustin Howett

This is a really old question, but David is actually incorrect on most counts.

这是一个非常古老的问题,但实际上大卫在大多数方面都是错误的。

You can add custom UI to jailbroken devices, create tweaks without Xcode, hook into anything you wish, and more, without even having the source code for SpringBoard or wishing for it to be extensible.

您可以将自定义 UI 添加到越狱设备、无需 Xcode 即可创建调整、连接到您想要的任何内容等等,甚至无需 SpringBoard 的源代码或希望它可扩展。

MobileSubstrate is a code replacement platform that literally allows you to do anything. You don't even need to be an expert, but admittedly, having at least a moderate grasp on programming and Objective-C concepts helps a lot.

MobileSubstrate 是一个代码替换平台,可以让你做任何事情。您甚至不需要成为专家,但不可否认,至少对编程和 Objective-C 概念有一定的了解会有很大帮助。

回答by David

What you're talking about cannot be done. You're assuming 1) that you will have the source code for Springboard (lock screen), and 2) that those programs are extendable.

你说的这些是做不到的。您假设 1) 您将拥有 Springboard(锁定屏幕)的源代码,以及 2) 这些程序是可扩展的。

Without having the source code (it's proprietary), you cannot make "Tweaks" to the lock screen. You have nothing to compile into the lockscreen.

如果没有源代码(它是专有的),您就无法对锁定屏幕进行“调整”。你没有任何东西可以编译到锁屏中。

While you can mod them by editing the internal plists (simple things like show title bar or disable rotation), you will not be able to add functionality using XCode.

虽然您可以通过编辑内部 plist(简单的事情,如显示标题栏或禁用旋转)来修改它们,但您将无法使用 XCode 添加功能。

To create "tweaks" you would have to rewrite the lock screen entirely, or insert very low-level hooks into the Springboard/iOS. This is not possible via Xcode alone, since Xcode is not capable of even installing iOS-level apps (all installed apps are user-level).

要创建“调整”,您必须完全重写锁定屏幕,或者将非常低级的钩子插入 Springboard/iOS。这不能单独通过 Xcode 实现,因为 Xcode 甚至无法安装 iOS 级别的应用程序(所有已安装的应用程序都是用户级别的)。

You need expert knowledge of the private framework calls, and possibly be capable of disassembling and reverse engineering the specific program you're trying to extend.

您需要有关私有框架调用的专业知识,并且可能能够对您尝试扩展的特定程序进行反汇编和逆向工程。