开发 Mobile Substrate 调整
我有一些关于开发移动基板调整的问题。
首先,你如何制作它们?
一定要用XCode吗?
需要什么类型的文件以及您将代码放在哪里?
如何连接到应用程序?
例如,如果我想更改 Messages 应用程序中的某些内容,我该如何编程才能将其挂接到 Messages.app 中?
我非常熟悉为应用程序商店开发常规应用程序,并且我对移动底层非常感兴趣。我真的很想知道如何去做以及从哪里开始。谢谢!
I have a few questions about developing mobile substrate tweaks.
First of all, how do you make them?
Do you have to use XCode?
What kind of files are needed and where do you place your code?
How do you hook into an app?
For example if I want to change something in the Messages app, how could I program it to hook into Messages.app?
I am pretty familiar with developing regular apps for the app store, and I am very interested in mobile substrate. I would really like to know how to do it and where to start. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
到目前为止,开发 MS 调整的最简单方法是使用 Theos
按照以下说明进行操作使用上面的链接安装 theos,导航到要存储项目的文件夹并运行 $THEOS/bin/nic.pl 来生成调整模板。
生成的 Tweak.xm 文件是您放置代码的位置。要构建项目,只需导航到终端中的项目目录并运行
make
。如果您的系统上有dpkg
,那么您可以轻松打包并安装该项目。确保您的 iDevice 上安装了OpenSSH
并将此行添加到项目的 makefile 中:然后运行
make package install
来构建您的项目,将其打包在 .deb 中,然后传输到您的设备并安装它。Tweak.xm 文件中实际包含的代码是 Objective-C,使用一种名为 Logos 的语言来简化 Mobile Substrate 任务,其解释如下:http://iphonedevwiki.net/index.php/Logos。一般来说,代码遵循以下格式:
要找出需要重写哪些类和方法来执行您想做的任何事情,请从 cydia 安装
class-dump
,ssh 到您的设备并运行class-dump -H path/to/your/binary -o /path/where/you/want/your/classheaders
.然后,您只需查看生成的标头,找到名称与您正在执行的操作相关的类和方法,然后对它们进行试验。祝你好运!
By far, the easiest way to develop MS tweaks is to use Theos
Follow the instructions given on the link above to install theos, navigate to the folder you want to store the project in and run
$THEOS/bin/nic.pl
to generate a template for your tweak.The generated Tweak.xm file is where you put your code. To build the project just navigate to the project directory in Terminal and run
make
. If havedpkg
on your system, then you can package up and install the project easily. Make sureOpenSSH
is installed on your iDevice and add this line to your project's makefile:Then run
make package install
to build your project, package it in a .deb, transfer it over to your device and install it.The code that actually goes in the Tweak.xm file is objective-C with a language that simplifies Mobile Substrate tasks called Logos, which is explained here: http://iphonedevwiki.net/index.php/Logos. Generally though, the code follows this format:
To find out what classes and methods you need to override to do whatever you want to do, install
class-dump
from cydia, ssh into your device and runclass-dump -H path/to/your/binary -o /path/where/you/want/your/classheaders
. Then you just have to look through the resulting headers to find classes and methods that have names that seem relevant to what you're doing, and experiment with them.Good luck!
我在博客上写了一个 MobileSubstrate 调整教程
如果您关注它,我希望您会发现它有用!
I wrote a MobileSubstrate tweak tutorial on my blog
If you follow it, I hope you find it useful!