-
Notifications
You must be signed in to change notification settings - Fork 103
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
iOS (device+simulator) support? #35
Comments
@cyrille-legrand we have a repo to generate static library libssh2.xcframework for iOS/maccatalyst and simulator @ https://github.com/nocsi/ngit-lib. So far it works fine if you use it as a drop-in for CSSH. |
This lib is only built to work on macOS -- I'd love to see it work on iOS, but I'm not exactly sure what it would entail. If someone would like to look into this and make a PR, I'd gladly merge it in! |
Hey. I actually would like to see this library on iOS! Currently, I'm developing an iOS application that should make use of SSH and build on top of it to interface with *nix systems to help manage them. Also, it would be nice to indicate on the homepage with a badge that this library is macOS only. It took me a while to figure that out. 🙃 Thanks. |
I recently managed to get this working on iOS. That said, it's still, well, a bit hacky. I might be able to clean this up and put it into a PR at some point in the near future, but no point making other wait if this can be useful :-P Here is what was needed First, compile the librariesUse https://github.com/Frugghi/iSSH2 to compile for the various architectures. This was a bit tricky to get working correctly. Simply doing something like @jakeheis - not sure how you feel about this, but maybe it could be possible to have such an auxiliary script to download and compile libssh and openssl bundled with this package? I saw a PR to include a 3rd party pre-compiled library, this may be a more transparent/secure option. Maybe there is a more idiomatic way of doing this with Swift? (I may end up spending some time digging into this at some point, happy to contribute any findings or PR if I do this) Second, modify ShoutThis bit is more straightforward and maybe can be cleaned up by someone more familiar with Swift than me :) In module.modulemap, link to openssl's crypto library
Now, for the ugly part (maybe someone more familiar with xcode and swift can clean this up). I can't get xcode to locate the headers for libssh2, so I end up converting the #include "/Users/someuser/blablabla/libssh2/include/libssh2.h"
#include "/Users/someuser/blablabla/libssh2/include/libssh2_sftp.h"
#include "/Users/someuser/blablabla/libssh2/include/libssh2_publickey.h" (yea, I've tried setting the header search paths in Now, to make this work in your xcode project....Set the Last, make sure you're linking with import zlib If you fail to do this, you'll see 6 or so compression related symbols that aren't able to be resolved. |
Hi there, I can't seem to find how to integrate this in an Xcode 11 project, targeting iOS 13, with SPM. Maybe it's related to CSSH declaring its providers as "brew" and "apt" only, but Xcode can't link the project to libssh2.
I tried building libssh for iOS (device + simulator) using github.com/Frugghi/iSSH2 but it gives me a .a instead of a .dylib and I am clueless as to how link this to CSSH and ultimately Shout.
Has anyone here had success building Shout for iOS?
The text was updated successfully, but these errors were encountered: