-
-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add support for using iSH on Apple Watches #842
base: master
Are you sure you want to change the base?
Conversation
I'm not entirely convinced this is a good idea, but I guess we'll find out. Also it's best if you use objective-c instead of swift, the app is small enough that adding an empty swift file would inflate it by 5x. |
@tbodt I’m not sure if how representative it is, but for me the iSH app went from 4.9MB to 8.5MB according to the systems settings. It is quite bad in relative terms, but not quite 5X. I think the situation has gotten a lot better recently since Apple is now bundling most things related to Swift within iOS, which they didn’t do for quite some time (if I remember things correctly). I’ll try to get the MVP running with Swift and SwiftUI due to its simplicity and then port it to ObjC once we know what we want to achieve. As for the use cases you’re describing, @filfat, that’s more or less exactly what I’m trying to solve. It mostly works now, but there’s no way of simply adding commands to show up on the watch. The extension of this is to get the Shortcuts app to work with iSH, but that’s an issue for another day. |
Also iSH supports iOS 11, so SwiftUI is out. But it's ok to start with SwiftUI and then port it to ObjC/UIKit. The 5x number came from building the project in release mode, measuring the size in the finder, than adding an empty swift file and doing it again. It was something like 6mb/30mb. |
Thanks for the explanation, @tbodt, Swift is definitely out then. |
What about preset commands that can be changed from the app |
@dontbanmeplz I was thinking about that as well and that's what I'm currently doing in the WIP. However, with the arrival of the Shortcut app to the watch, perhaps it's better to investigate if one can handle commands from Shortcuts instead. Does anyone know if it's possible to add custom abilities so that iSH can be invoked from Shortcuts? If so, we might kill two birds with one stone by implementing that support instead. |
@AlexGustafsson if you could make it so you could execute commands and see their output from shortcuts app the shortcuts community would now have no bounds and they would thank you. if it is possible PLEASE do that. |
See #59. I looked into this once but at the time the shortcut would have to execute in a different process which would make it pretty unworkable. iOS 14 removes this limitation with in-app intent handling, but I haven't had the chance to give it another shot. Would appreciate contributions here. |
Tbh i know nothing about iOS coding so i cant be of much help |
You can do this now but it is a bit ugly. Start sshd, put ish in the
background, use the Run Script over ssh Shortcut action, et voilà. It even
works in personal automations with no user intervention required.
…On Tue, Dec 15, 2020 at 12:46 PM dontbanmeplz ***@***.***> wrote:
@AlexGustafsson <https://github.com/AlexGustafsson> if you could make it
so you could execute commands and see their output from shortcuts app the
shortcuts community would now have no bounds and they would thank you. if
it is possible PLEASE do that.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#842 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLDPSEB4CAYYPE3VX2JL2TSU6OFRANCNFSM4PH46SCQ>
.
|
Well yes but you know it would be so much better |
Hey ! Interesting approach. But There was no update even after 3 years. So I would like to ask what the current stage this WIP is and if this will be continued or dropped. Thanks in advance |
Intent
The intent of this PR is to start development for supporting iSH on Apple Watches.
iSH is a fantastic piece of code which I think is quite unprecedented. By implementing support for watchOS, the project could continue to grow and allow for new use cases.
Goals
Goals:
Non-goals:
Planned approach
The watch app will be developed using Swift and SwiftUI. The app is meant to run side by side with the iSH app and act as a simple UI for the app.
Within the main iOS app a view will be added to support saving commands such as
nslookup google.com
for easy access within the watchOS app. The watchOS app will then allow for running these commands and see their output.The app is planned to interact with the same layer as the terminal running within the iOS app to enable shared interactions.
Comments
I hope to continue to work on this PR every now and then, but without any real time constraints.
I welcome any comments on code quality, procedures etc.