Skip to content

Commit 83f4c6c

Browse files
committed
fix: ios 18
Signed-off-by: Lessica <82flex@gmail.com>
1 parent b51dc79 commit 83f4c6c

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

TrollFools.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@
10161016
repositoryURL = "https://github.com/siteline/swiftui-introspect.git";
10171017
requirement = {
10181018
kind = exactVersion;
1019-
version = 1.0.0;
1019+
version = 1.3.0;
10201020
};
10211021
};
10221022
CC0D662B2D7F11A2000EADED /* XCRemoteSwiftPackageReference "ArArchiveKit" */ = {

TrollFools.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TrollFools/AppListView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ struct AppListView: View {
195195
.onReceive(searchViewModel.$searchScopeIndex) {
196196
appList.activeScope = Scope(rawValue: $0) ?? .all
197197
}
198-
.introspect(.viewController, on: .iOS(.v14, .v15, .v16, .v17)) { viewController in
198+
.introspect(.viewController, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { viewController in
199199
if searchViewModel.searchController == nil {
200200
viewController.navigationItem.hidesSearchBarWhenScrolling = true
201201
viewController.navigationItem.searchController = {

TrollFools/CLI/CmdInject.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct CmdInject: ParsableCommand {
2828

2929
func run() throws {
3030
guard let app = LSApplicationProxy(forIdentifier: bundleIdentifier),
31+
let appID = app.applicationIdentifier(),
3132
let bundleURL = app.bundleURL()
3233
else {
3334
throw ArgumentParser.ValidationError("The specified application does not exist.")
@@ -39,6 +40,16 @@ struct CmdInject: ParsableCommand {
3940
}
4041
let pluginURLs = pluginPaths.compactMap { URL(fileURLWithPath: $0) }
4142
let injector = try InjectorV3(bundleURL, loggerType: .os)
43+
if injector.appID.isEmpty {
44+
injector.appID = appID
45+
}
46+
if injector.teamID.isEmpty {
47+
if let teamID = app.teamID() {
48+
injector.teamID = teamID
49+
} else {
50+
injector.teamID = "0000000000"
51+
}
52+
}
4253
injector.useWeakReference = weakReference
4354
injector.injectStrategy = fastInjection ? .fast : .lexicographic
4455
try injector.inject(pluginURLs)

0 commit comments

Comments
 (0)