Skip to content
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

Support iOS simulator #1

Open
daonb opened this issue Jun 1, 2022 · 6 comments
Open

Support iOS simulator #1

daonb opened this issue Jun 1, 2022 · 6 comments
Labels
devops Config & Code that's not part of any version

Comments

@daonb
Copy link
Contributor

daonb commented Jun 1, 2022

When trying to build the NMSSH library for an iPad simulator we get the error
message:


ld: in /Users/daonb/src/NMSSH/NMSSH-iOS/Libraries/lib/libssh2.a(agent.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
@daonb daonb added the devops Config & Code that's not part of any version label Jun 8, 2022
@Akaame
Copy link

Akaame commented Mar 14, 2023

Hello, I was going to take a jab at #3 because its issuehunt bounty seemed attractive. Having a look at that I have seen this issue and tried my hand at this and come up with how this would work with the involvement of iSSH2/NMSSHT7 and this repository.

Ionic, Capacitor et al. are kind of dead. I do not know if you are still maintaining this and if the bounty for #3 still holds.

@daonb
Copy link
Contributor Author

daonb commented Mar 15, 2023

Thanks for reaching out. The bounty still hold as I need this plugin to work on the simulator. You're right it involves NMSSHT7 which is also controlled by me and I'd welcome your PR.

I wonder what made you thing capacitor is dead? If anything it changes too rapidly and occasionally break their API.

@Akaame
Copy link

Akaame commented Mar 15, 2023

I meant "dead" in the sense that it does not have the buzz it used to have. But let's not derail from the topic.

So here is the gist of the problem:

  • We are running into this problem mainly because of M1. Issue on iSSH2 (which creates the binaries for libssh2, libssl and libcrypto) here. The first step for a clean solution would be actually distinguishing here between iphoneos and iphonesimulator as two different platforms (as that is what they are). However, that might mean that instead of depending single archive files (such as this), we now might have to depend on xcframeworks as we live in a multiplatform/multiarchitecture world now.
  • Second leg of the problem is NMSST7 also has to be an xcframework that is easier as it is it is just a podfile + custom build script change.
  • The third leg is bringing these together in this plugin.

Have a look at this proposal and if you like it I can start working on this. If iSSH2 is not receptive to the change we want to make we can get the prebuilt xcframeworks from somewhere else or build them ourselves forking the library. How does it sound?

Cheers.

@daonb
Copy link
Contributor Author

daonb commented Mar 17, 2023

Sounds good!

I don't like the podfile and I'd be happy to replace it. Another thing you'll need to add is a basic test that automated the simulator and connects to a local SSH server.

@daonb
Copy link
Contributor Author

daonb commented Mar 20, 2023

I've did some research and I'm not sure we can replace the podfile as capacitor needs it.

@Akaame
Copy link

Akaame commented Mar 20, 2023

I think you have misunderstood me. podfile is necessary and okay. What is wrong is the original NMSSH library was vendoring binary files along with the library itself which is a horrible way to distribute software. I proposed to change that. Was busy with work. Will try to create an initial fix for the NMSSHT7 today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops Config & Code that's not part of any version
Projects
None yet
Development

No branches or pull requests

2 participants