编写 iOS 越狱插件:从 NIC 中创建项目

1,656次阅读
没有评论

安装好 Theos 之后,我们便可以开始编写插件了。第一步,我们可以利用 Theos 提供的 New Instance Creator(NIC)来创建一个项目模板。这样一来,很多基本信息的文件,我们就不用手工编辑了。

执行 NIC

在安装好 Theos 的基础上,可以执行下列命令启动 NIC 程序。

1
$THEOS/bin/nic.pl

之后,NIC 会在终端上打印出一个列表,询问你想要创建何种类型的项目。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$ $THEOS/bin/nic.pl
NIC 2.0 – New Instance Creator
——————————
[1.] iphone/activator_event
[2.] iphone/activator_listener
[3.] iphone/application
[4.] iphone/application_swift
[5.] iphone/control_center_module-11up
[6.] iphone/cydget
[7.] iphone/flipswitch_switch
[8.] iphone/framework
[9.] iphone/library
[10.] iphone/notification_center_widget
[11.] iphone/notification_center_widget-7up
[12.] iphone/preference_bundle
[13.] iphone/preference_bundle_swift
[14.] iphone/theme
[15.] iphone/tool
[16.] iphone/tool_swift
[17.] iphone/tweak
[18.] iphone/tweak_with_simple_preferences
[19.] iphone/xpc_service
[20.] iphone/xpc_service_modern
Choose a Template (required):

我们主要关注的是其中的 iphone/tweakiphone/tweak_with_simple_preferences。后者会构造一个 Preferences.plist 文件,以便我们能在 iOS 的系统设置中配置该插件的行为。

这里我们选择 18。接下来,NIC 会交互式地要求我们键入一些插件的信息。

1
2
3
4
5
6
7
8
Choose a Template (required): 18
Project Name (required): PhantomSteps
Package Name [com.yourcompany.phantomsteps]: page.liam.phantom_steps
Author/Maintainer Name [Liam Huang]:
[iphone/tweak_with_simple_preferences] MobileSubstrate Bundle filter [com.apple.springboard]: com.apple.Health
[iphone/tweak_with_simple_preferences] List of applications to terminate upon installation (space-separated, ‘-‘ for none) [SpringBoard]: com.apple.Health
Instantiating iphone/tweak_with_simple_preferences in phantomsteps/…
Done.

这里,我们给项目起名为 PhantomSteps,其包名称为 page.liam.phantom_steps。你可以按需修改。MobileSubstrate Bundle filter 这一项是说,你可能影响的 App 的名字。List of applications to terminate upon installation 这一项则是说,在安装你的插件时,需要杀死的程序的名字。

目录结构

创建成功后,目录结构应该类似

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ tree .
.
├── Makefile
├── PhantomSteps.plist
├── Tweak.x
├── control
└── layout
└── Library
└── PreferenceLoader
└── Preferences
└── PhantomSteps
└── Preferences.plist

5 directories, 5 files

这里

  • PhantomSteps.plist 记录了需要杀死的包的名称。
  • control 包含了先前在 NIC 交互式环境中填写的信息。
  • Makefile 是对应 GNU make 的文件。
  • Tweak.x 是插件自身的代码。Theos 会从模板中创建一个带有各种注释的文件供参考。

通过 NIC 模板创建的项目可见:GitHub

 Read More 

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 0
评论(没有评论)

文心AIGC

2023 年 3 月
 12345
6789101112
13141516171819
20212223242526
2728293031  
文心AIGC
文心AIGC
人工智能ChatGPT,AIGC指利用人工智能技术来生成内容,其中包括文字、语音、代码、图像、视频、机器人动作等等。被认为是继PGC、UGC之后的新型内容创作方式。AIGC作为元宇宙的新方向,近几年迭代速度呈现指数级爆发,谷歌、Meta、百度等平台型巨头持续布局
文章搜索
热门文章
潞晨尤洋:日常办公没必要上私有模型,这三类企业才需要 | MEET2026

潞晨尤洋:日常办公没必要上私有模型,这三类企业才需要 | MEET2026

潞晨尤洋:日常办公没必要上私有模型,这三类企业才需要 | MEET2026 Jay 2025-12-22 09...
“昆山杯”第二十七届清华大学创业大赛决赛举行

“昆山杯”第二十七届清华大学创业大赛决赛举行

“昆山杯”第二十七届清华大学创业大赛决赛举行 一水 2025-12-22 17:04:24 来源:量子位 本届...
MiniMax海螺视频团队首次开源:Tokenizer也具备明确的Scaling Law

MiniMax海螺视频团队首次开源:Tokenizer也具备明确的Scaling Law

MiniMax海螺视频团队首次开源:Tokenizer也具备明确的Scaling Law 一水 2025-12...
天下苦SaaS已久,企业级AI得靠「结果」说话

天下苦SaaS已久,企业级AI得靠「结果」说话

天下苦SaaS已久,企业级AI得靠「结果」说话 Jay 2025-12-22 13:46:04 来源:量子位 ...
最新评论
ufabet ufabet มีเกมให้เลือกเล่นมากมาย: เกมเดิมพันหลากหลาย ครบทุกค่ายดัง
tornado crypto mixer tornado crypto mixer Discover the power of privacy with TornadoCash! Learn how this decentralized mixer ensures your transactions remain confidential.
ดูบอลสด ดูบอลสด Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
Obrazy Sztuka Nowoczesna Obrazy Sztuka Nowoczesna Thank you for this wonderful contribution to the topic. Your ability to explain complex ideas simply is admirable.
ufabet ufabet Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
ufabet ufabet You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
ufabet ufabet Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
热评文章
摩尔线程的野心,不藏了

摩尔线程的野心,不藏了

摩尔线程的野心,不藏了 量子位的朋友们 2025-12-22 10:11:58 来源:量子位 上市后的仅15天...
摩尔线程的野心,不藏了

摩尔线程的野心,不藏了

摩尔线程的野心,不藏了 量子位的朋友们 2025-12-22 10:11:58 来源:量子位 上市后的仅15天...
AI体育教练来了!中国团队打造SportsGPT,完成从数值评估到专业指导的智能转身

AI体育教练来了!中国团队打造SportsGPT,完成从数值评估到专业指导的智能转身

AI体育教练来了!中国团队打造SportsGPT,完成从数值评估到专业指导的智能转身 量子位的朋友们 2025...
AI体育教练来了!中国团队打造SportsGPT,完成从数值评估到专业指导的智能转身

AI体育教练来了!中国团队打造SportsGPT,完成从数值评估到专业指导的智能转身

AI体育教练来了!中国团队打造SportsGPT,完成从数值评估到专业指导的智能转身 量子位的朋友们 2025...
真正面向大模型的AI Infra,必须同时懂模型、系统、产业|商汤大装置宣善明@MEET2026

真正面向大模型的AI Infra,必须同时懂模型、系统、产业|商汤大装置宣善明@MEET2026

真正面向大模型的AI Infra,必须同时懂模型、系统、产业|商汤大装置宣善明@MEET2026 量子位的朋友...