Ios 如何为我的移动基板调整制作首选包?
我的iPhone中安装了Ios 如何为我的移动基板调整制作首选包?,ios,settings,tweak,theos,cydia-substrate,Ios,Settings,Tweak,Theos,Cydia Substrate,我的iPhone中安装了theos,sdk3 我也创建了一个工作调整,但不知道如何创建一个首选项包来添加一些设置 我希望在首选项按钮中添加Yes/No或BOOL按钮,以查看是否要启用调整 如果启用或未启用,如何使我的调整读取? Exmaple: 请帮助检查此链接 Aehmlo LXAINT详细解释了如何进行简单调整,并添加设置以启用/禁用它 它对我有用。 希望这是你需要的 您可能还想从Cydia安装“Theos教程”。它的作者是反向效应 从中选择教程 转到“设置” 如果用户想要禁用我们的调整呢?
theos
,sdk3
我也创建了一个工作调整,但不知道如何创建一个首选项包来添加一些设置
我希望在首选项按钮中添加Yes/No或BOOL按钮,以查看是否要启用调整
如果启用或未启用,如何使我的调整读取?
Exmaple:
请帮助检查此链接
Aehmlo LXAINT详细解释了如何进行简单调整,并添加设置以启用/禁用它
它对我有用。
希望这是你需要的
您可能还想从Cydia安装“Theos教程”。它的作者是反向效应
从中选择教程
转到“设置”
如果用户想要禁用我们的调整呢?我们可以给他机会
能够从首选项捆绑中启用或禁用它。
(对于这样简单的事情,我们可以使用plist,但我们将使用
首选项捆绑项目,以便进行尝试)。我要跳过几个
有了这些步骤,你就可以自己去弄清楚,看看
您可以在下面下载源代码。
-启动新实例创建者,并启动“PreferenceBundle”项目。
-通过以下方式将该项目作为“子项目”添加到主调整项目中:
在Makefile中添加SUBPROJECTS=tutorialsettings键。
-偏好束的结构由一个包含
标准首选项应用程序使用的os PSSpecifiers集合。
-创建一个控制“已启用”键的开关。
-对于其“defaults”键,将其设置为以前使用的包id
(com.filippobiga.tutorial)。这意味着它将使用
该名称位于用户的首选项文件夹中。
-现在需要修改Tweak.xm中的代码以读取用户的
设置并确定是否应在屏幕上闪烁。
就这样!谢谢你的回答。我现在就看。我已经设置了theos教程,但他关于偏好捆绑包调整的教程对我不起作用。为什么我不能在iPhone上打开该页面?我不知道为什么。从计算机上尝试。您已打开计算机上的第一个链接吗?
-(void)Something {
if (Enable = YES) {
/*Method here*/ }
else {
//Do nothing
}
}
What about if the user would like to disable our tweak? We can give him the
ability to enable or disable it from a preference bundle.
(We could use just a plist for something simple like this, but we’ll use a
preference bundle project in order to try it out). I’m going to skip a few
steps with this, since you can figure them out yourself, looking at the
source code you can download below.
- Launch the new instance creator, and initiate a “PreferenceBundle” project.
- Add that project as a “subproject” in your main tweak project, by
adding the SUBPROJECTS = tutorialsettings key in the Makefile.
- The structure of the preference bundle is given by a plist containing
a collection os PSSpecifiers, used by the standard Preferences app.
- Create a switch controlling the “Enabled” key.
- For its “defaults” key set it to the package id you used before
(com.filippobiga.tutorial). This means it’ll write to a plist with
that name in the Preferences folder of the user.
- Now you need to modify the code in the Tweak.xm to read the user’s
Settings and determine if it should flash the screen or not.
That’s it!