-
Notifications
You must be signed in to change notification settings - Fork 133
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
Attempting to link LibFido2Swift
to xcodes
#387
base: main
Are you sure you want to change the base?
Conversation
@@ -2,6 +2,7 @@ import Foundation | |||
import PromiseKit | |||
import PMKFoundation | |||
import Rainbow | |||
import LibFido2Swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be used later for Hardware challenge
Hm, I guess the problem is that LibFido2Swift relies on dynamic/shared libraries. Shared libraries aren't merged into the executable. If you have an app bundle, they're embedded in the bundle (example: |
Also I believe that it works when running from within Xcode because Xcode does some magic by setting |
Interesting. Yeah I kind of assumed that Xcode was crating some sort of magic sandboxing. Is there a way we could "bundle" all of the dependencies into a single package that includes the static dependencies? Seems like there are other people dealing with adjacent issues. It would be great if we could keep this separate from I can't find the forum post, but there was a forum reply somewhere talking telling the compiler to look at the global install path. But that doesn't allow us to only tell users who need this to install the given dependencies. |
or we rewrite libfido2 in swift along with all of it's dependencies 😜 |
I'm not sure if this is possible with SPM. I could maybe just make a Maybe mergable libraries could also help, but that's also an Xcode feature and not supported in SPM to my knowledge. |
Sorry busy trying to understand crypto for the login issue so haven't been responding. What is The idea that I had was that if the only dependency is |
Yeah perhaps we can do something like what is done for |
Yeah I don't think there is optional linking in SPM currently. IMO Looking deeper into It will still be a good chunk of work but I think long term it's better than doing the dynamic linking gymnastics. I'm more than willing to continue working on this to get it over the finish line |
Yeah honestly I think that's a really good idea. I had a lot of trouble getting it working for Xcodes.app in the first place lol so I would be down for this approach. Lmk if you need any help :) |
Do not merge
I'm looking for some help linking LibFido2Swift to the
xcodes
executableTarget
.The project builds, it will run as expected if running within Xcode.
but as soon as I go to run that exact same build from the command line
/Users/gage/Library/Developer/Xcode/DerivedData/xcodes-eftbhwhateverlfqcanhgofyytinnj/Build/Products/Debug/xcodes list
I get this error
At first I thought it was an issue with
LibFido2Swift
not linkinglibcrypto
but I tried addingbut that did not work either.
I then tried to just copy the content
LibFido2Swift
into this project then create a "local"LibFido2Swift
module internally and that didn't work either.I'm wondering if I'm missing something about the linking
binaryTargets
to aexecutable
product.@kinoroy or @MattKiazyk if could take a look at this branch see if I'm missing anything that would be awesome!