Skip to content

Commit 3c4f1dc

Browse files
committed
feat: add disclaimer
Signed-off-by: Lessica <82flex@gmail.com>
1 parent c774822 commit 3c4f1dc

File tree

9 files changed

+135
-3
lines changed

9 files changed

+135
-3
lines changed

TrollFools.xcodeproj/project.pbxproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
6168001B2D364DD400DF485F /* StripedTextTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6168001A2D364DD400DF485F /* StripedTextTableViewController.m */; };
4949
6168001D2D3652B600DF485F /* LogsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6168001C2D3652B100DF485F /* LogsView.swift */; };
5050
61946B262D2FD8AB009E0AC4 /* OrderedCollections in Frameworks */ = {isa = PBXBuildFile; productRef = 61946B252D2FD8AB009E0AC4 /* OrderedCollections */; };
51+
61C7D54A2D82D8E40064D626 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 61C7D5462D82D5C60064D626 /* InfoPlist.strings */; };
52+
61C7D54C2D82DBAD0064D626 /* DisclaimerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C7D54B2D82DBAC0064D626 /* DisclaimerView.swift */; };
5153
61EFA3642D30267E00159442 /* InjectorV3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61EFA3632D30267200159442 /* InjectorV3.swift */; };
5254
61EFA3672D3026D400159442 /* CocoaLumberjack in Frameworks */ = {isa = PBXBuildFile; productRef = 61EFA3662D3026D400159442 /* CocoaLumberjack */; };
5355
61EFA3692D3026D400159442 /* CocoaLumberjackSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 61EFA3682D3026D400159442 /* CocoaLumberjackSwift */; };
@@ -152,6 +154,11 @@
152154
616800192D364DD400DF485F /* StripedTextTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StripedTextTableViewController.h; sourceTree = "<group>"; };
153155
6168001A2D364DD400DF485F /* StripedTextTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StripedTextTableViewController.m; sourceTree = "<group>"; };
154156
6168001C2D3652B100DF485F /* LogsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogsView.swift; sourceTree = "<group>"; };
157+
61C7D5452D82D5C60064D626 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
158+
61C7D5472D82D5C80064D626 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
159+
61C7D5482D82D5C90064D626 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
160+
61C7D5492D82D5C90064D626 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/InfoPlist.strings; sourceTree = "<group>"; };
161+
61C7D54B2D82DBAC0064D626 /* DisclaimerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisclaimerView.swift; sourceTree = "<group>"; };
155162
61EFA3632D30267200159442 /* InjectorV3.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InjectorV3.swift; sourceTree = "<group>"; };
156163
61EFA36C2D3027AF00159442 /* InjectorV3+Command.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InjectorV3+Command.swift"; sourceTree = "<group>"; };
157164
61EFA36E2D30338300159442 /* InjectorV3+Bundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InjectorV3+Bundle.swift"; sourceTree = "<group>"; };
@@ -273,6 +280,7 @@
273280
children = (
274281
6124A0732CD2328600C52253 /* AppListCell.swift */,
275282
CCF4706D2C4A4BAB008D8197 /* AppListView.swift */,
283+
61C7D54B2D82DBAC0064D626 /* DisclaimerView.swift */,
276284
CC15490D2C4B80AF00A4173E /* EjectListView.swift */,
277285
CC1548D42C4A744300A4173E /* FailureView.swift */,
278286
614C0C6B2D7D72C7007E9184 /* IndexableScroller.swift */,
@@ -359,6 +367,7 @@
359367
children = (
360368
CCF4705D2C4A464B008D8197 /* Assets.xcassets */,
361369
CC60FBE92CC4E6C400A6D21A /* Info.plist */,
370+
61C7D5462D82D5C60064D626 /* InfoPlist.strings */,
362371
CCF4706B2C4A4919008D8197 /* Localizable.strings */,
363372
CC3485142C71B219007E0E28 /* TrollFools.entitlements */,
364373
CC3485152C71B219007E0E28 /* Version.xcconfig */,
@@ -549,6 +558,7 @@
549558
CC0E80FB2C54F84000B137B4 /* mv-15 in Resources */,
550559
CC1549002C4AB43600A4173E /* rm in Resources */,
551560
CC1548DD2C4A8DC500A4173E /* insert_dylib in Resources */,
561+
61C7D54A2D82D8E40064D626 /* InfoPlist.strings in Resources */,
552562
CC5E54BE2C4E12F900FDE4A8 /* install_name_tool in Resources */,
553563
CCC564EB2C4BE8320097C300 /* ldid in Resources */,
554564
CC15490C2C4B79D800A4173E /* optool in Resources */,
@@ -622,6 +632,7 @@
622632
CC19E4BB2C561D7300E0F1B5 /* SettingsView.swift in Sources */,
623633
61EFA36F2D30338B00159442 /* InjectorV3+Bundle.swift in Sources */,
624634
61EFA3642D30267E00159442 /* InjectorV3.swift in Sources */,
635+
61C7D54C2D82DBAD0064D626 /* DisclaimerView.swift in Sources */,
625636
6124A07F2CD233BA00C52253 /* PlugInCell.swift in Sources */,
626637
61EFA37B2D31165700159442 /* InjectorV3+Backup.swift in Sources */,
627638
61EFA3712D3033BB00159442 /* InjectorV3+Error.swift in Sources */,
@@ -650,6 +661,17 @@
650661
/* End PBXTargetDependency section */
651662

652663
/* Begin PBXVariantGroup section */
664+
61C7D5462D82D5C60064D626 /* InfoPlist.strings */ = {
665+
isa = PBXVariantGroup;
666+
children = (
667+
61C7D5452D82D5C60064D626 /* en */,
668+
61C7D5472D82D5C80064D626 /* zh-Hans */,
669+
61C7D5482D82D5C90064D626 /* it */,
670+
61C7D5492D82D5C90064D626 /* vi */,
671+
);
672+
name = InfoPlist.strings;
673+
sourceTree = "<group>";
674+
};
653675
CCF4706B2C4A4919008D8197 /* Localizable.strings */ = {
654676
isa = PBXVariantGroup;
655677
children = (

TrollFools/DisclaimerView.swift

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
//
2+
// DisclaimerView.swift
3+
// TrollFools
4+
//
5+
// Created by 82Flex on 3/13/25.
6+
//
7+
8+
import SwiftUI
9+
10+
struct DisclaimerView: View {
11+
@Binding var isDisclaimerHidden: Bool
12+
13+
var body: some View {
14+
NavigationView {
15+
ScrollView {
16+
VStack(alignment: .leading, spacing: 20) {
17+
Text("""
18+
本开源软件仅用于 iOS 逆向工程技术交流与学习目的,严禁任何非法或商业用途。用户在使用过程中应严格遵守所在地法律法规,因滥用造成的任何法律责任均与开发者/发布者无关。开发者不对软件功能的完整性、适用性及使用后果承担责任,亦不鼓励任何违反服务条款或侵害知识产权的行为。
19+
""")
20+
21+
Text("""
22+
This open-source software is provided solely for educational and technical exchange purposes in iOS reverse engineering studies. Any illegal or commercial use is strictly prohibited. Users must comply with all applicable local laws and regulations. The developer/publisher shall not be held liable for any legal consequences arising from misuse. No warranties are provided regarding the software’s completeness, fitness for purpose, or consequences of use. The developer does not endorse any actions that violate service terms or infringe intellectual property rights.
23+
""")
24+
}
25+
.padding()
26+
.font(.body)
27+
}
28+
.navigationTitle("免责声明 / Disclaimer")
29+
.toolbar {
30+
ToolbarItem(placement: .bottomBar) {
31+
Button {
32+
exit(EXIT_SUCCESS)
33+
} label: {
34+
VStack(spacing: 0) {
35+
Text("退出")
36+
.font(.body)
37+
.fontWeight(.bold)
38+
Text("Exit")
39+
.font(.footnote)
40+
}
41+
.foregroundColor(.red)
42+
.padding()
43+
}
44+
}
45+
46+
ToolbarItem(placement: .bottomBar) {
47+
Button {
48+
isDisclaimerHidden = true
49+
} label: {
50+
VStack(spacing: 0) {
51+
Text("我已阅读并同意")
52+
.font(.body)
53+
.fontWeight(.bold)
54+
Text("I Have Read and Agree")
55+
.font(.footnote)
56+
}
57+
.foregroundColor(.accentColor)
58+
.padding()
59+
}
60+
}
61+
}
62+
}
63+
}
64+
}

TrollFools/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleDisplayName</key>
6+
<string>TrollFools</string>
57
<key>CFBundleDocumentTypes</key>
68
<array>
79
<dict>

TrollFools/TrollFoolsApp.swift

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,26 @@ import SwiftUI
1010
@main
1111
struct TrollFoolsApp: SwiftUI.App {
1212

13+
@AppStorage("isDisclaimerHidden")
14+
var isDisclaimerHidden: Bool = false
15+
1316
init() {
1417
try? FileManager.default.removeItem(at: InjectorV3.temporaryRoot)
1518
}
1619

1720
var body: some Scene {
1821
WindowGroup {
19-
AppListView()
20-
.environmentObject(AppListModel())
22+
ZStack {
23+
if isDisclaimerHidden {
24+
AppListView()
25+
.environmentObject(AppListModel())
26+
.transition(.opacity)
27+
} else {
28+
DisclaimerView(isDisclaimerHidden: $isDisclaimerHidden)
29+
.transition(.opacity)
30+
}
31+
}
32+
.animation(.easeInOut, value: isDisclaimerHidden)
2133
}
2234
}
2335
}

TrollFools/en.lproj/InfoPlist.strings

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// InfoPlist.strings
3+
// TrollFools
4+
//
5+
// Created by 82Flex on 3/13/25.
6+
//
7+
8+
"CFBundleDisplayName" = "TrollFools";

TrollFools/it.lproj/InfoPlist.strings

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// InfoPlist.strings
3+
// TrollFools
4+
//
5+
// Created by 82Flex on 3/13/25.
6+
//
7+
8+
"CFBundleDisplayName" = "TrollFools";

TrollFools/vi.lproj/InfoPlist.strings

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// InfoPlist.strings
3+
// TrollFools
4+
//
5+
// Created by 82Flex on 3/13/25.
6+
//
7+
8+
"CFBundleDisplayName" = "TrollFools";
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// InfoPlist.strings
3+
// TrollFools
4+
//
5+
// Created by 82Flex on 3/13/25.
6+
//
7+
8+
"CFBundleDisplayName" = "巨魔注入器";

TrollFools/zh-Hans.lproj/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
"The content of text file “%@” is empty." = "文本文件 “%@” 的内容为空。";
213213

214214
/* No comment provided by engineer. */
215-
"TrollFools" = "TrollFools";
215+
"TrollFools" = "巨魔注入器";
216216

217217
/* No comment provided by engineer. */
218218
"TrollRecorder" = "巨魔录音机";

0 commit comments

Comments
 (0)