add read from channel

remove button for appstore connect submission
lower ios version
update icon to remove transparency
This commit is contained in:
neon443
2025-06-07 18:30:24 +01:00
parent 5199158e04
commit d57b5c0b0b
5 changed files with 28 additions and 13 deletions

View File

Binary file not shown.

View File

@@ -503,7 +503,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 18; IPHONEOS_DEPLOYMENT_TARGET = 16;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@@ -533,7 +533,7 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 18; IPHONEOS_DEPLOYMENT_TARGET = 16;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",

View File

@@ -268,6 +268,8 @@ class SSHHandler: ObservableObject {
private func interactiveShellSession(channel: ssh_channel) { private func interactiveShellSession(channel: ssh_channel) {
var status: CInt var status: CInt
var buffer: [CChar] = Array(repeating: 0, count: 256)
var nbytes: CInt = 0
status = ssh_channel_request_pty(channel) status = ssh_channel_request_pty(channel)
guard status == SSH_OK else { return } guard status == SSH_OK else { return }
@@ -277,9 +279,23 @@ class SSHHandler: ObservableObject {
status = ssh_channel_request_shell(channel) status = ssh_channel_request_shell(channel)
guard status == SSH_OK else { return } guard status == SSH_OK else { return }
// Task {
while (ssh_channel_is_open(channel) != 0) && (ssh_channel_is_eof(channel) == 0) {
nbytes = ssh_channel_read(channel, &buffer, UInt32(MemoryLayout.size(ofValue: buffer)), 0)
if nbytes < 0 {
return
}
if nbytes > 0 {
write(1, buffer, Int(nbytes))
}
sleep(1)
}
// }
print(String(utf8String: buffer))
} }
func logSshGetError() { private func logSshGetError() {
logger.critical("\(String(cString: ssh_get_error(&self.session)))") logger.critical("\(String(cString: ssh_get_error(&self.session)))")
} }
} }

View File

@@ -15,6 +15,5 @@ struct ShhShellApp: App {
WindowGroup { WindowGroup {
ContentView(handler: sshHandler) ContentView(handler: sshHandler)
} }
.windowResizability(.contentMinSize)
} }
} }

View File

@@ -71,10 +71,10 @@ struct ContentView: View {
} }
} }
.disabled(!(connected && handler.authorized)) .disabled(!(connected && handler.authorized))
//
Button("request a shell") { // Button("request a shell") {
handler.openShell() // handler.openShell()
} // }
} }
} }
} }