Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion MeoAsstMac/Model/MAAViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ import SwiftUI
if touchMode == .MacPlayTools {
useAdbLite = false
connectionProfile = "CompatMac"
} else if touchMode == .WDA {
useAdbLite = false
connectionProfile = "CompatMac"
} else {
useAdbLite = true
}
Expand Down Expand Up @@ -227,6 +230,8 @@ extension MAAViewModel {
logTrace("ConnectingToEmulator")
if touchMode == .MacPlayTools {
logTrace("如果长时间连接不上或出错,请尝试下载使用“文件” > “PlayCover链接…”中的最新版本")
} else if touchMode == .WDA {
logTrace("正在通过 WebDriverAgent 连接,请确保 WDA 已在 iOS 设备上运行")
}
try await handle?.connect(adbPath: adbPath, address: connectionAddress, profile: connectionProfile)
logTrace("Running")
Expand Down Expand Up @@ -282,7 +287,7 @@ extension MAAViewModel {
private func loadResource(url: URL) async throws {
try await MAAProvider.shared.loadResource(path: url.path)

if touchMode == .MacPlayTools {
if touchMode == .MacPlayTools || touchMode == .WDA {
let platformResource = url.appendingPathComponent("resource")
.appendingPathComponent("platform_diff")
.appendingPathComponent("iOS")
Expand Down
6 changes: 6 additions & 0 deletions MeoAsstMac/Settings/ConnectionSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ struct ConnectionSettingsView: View {
.font(.caption).foregroundStyle(.secondary)
}

if viewModel.touchMode == .WDA {
Text("使用 WebDriverAgent 连接真实 iOS 设备。请确保 WDA 已在设备上运行(默认端口 8100)。")
.font(.caption).foregroundStyle(.secondary)
}

HStack {
Text("连接地址")
TextField("", text: $viewModel.connectionAddress)
Expand Down Expand Up @@ -75,4 +80,5 @@ enum MaaTouchMode: String, CaseIterable {
case minitouch
case maatouch
case MacPlayTools
case WDA
}
42 changes: 26 additions & 16 deletions Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -295,22 +295,6 @@
}
}
},
"CombatOps" : {
"localizations" : {
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "스테이지: 일반 작전"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "关卡:普通作战"
}
}
}
},
"CDK" : {
"shouldTranslate" : false
},
Expand Down Expand Up @@ -378,6 +362,22 @@
}
}
},
"CombatOps" : {
"localizations" : {
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "스테이지: 일반 작전"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "关卡:普通作战"
}
}
}
},
"CompleteCombat" : {
"localizations" : {
"ko" : {
Expand Down Expand Up @@ -1998,6 +1998,9 @@
}
}
}
},
"使用 WebDriverAgent 连接真实 iOS 设备。请确保 WDA 已在设备上运行(默认端口 8100)。" : {

},
"使用密文板" : {
"localizations" : {
Expand Down Expand Up @@ -2800,8 +2803,12 @@
}
}
}
},
"如果长时间连接不上或出错,请尝试下载使用\"文件\" > \"PlayCover链接…\"中的最新版本" : {

},
"如果长时间连接不上或出错,请尝试下载使用“文件” > “PlayCover链接…”中的最新版本" : {
"extractionState" : "stale",
"localizations" : {
"ko" : {
"stringUnit" : {
Expand Down Expand Up @@ -3670,6 +3677,9 @@
}
}
}
},
"正在通过 WebDriverAgent 连接,请确保 WDA 已在 iOS 设备上运行" : {

},
"每次执行时最大招募次数: " : {
"localizations" : {
Expand Down