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

Fails to compile because of swift-rs dependency when building for ios #1

Open
Zack-Xb opened this issue Jul 5, 2023 · 5 comments
Open

Comments

@Zack-Xb
Copy link

Zack-Xb commented Jul 5, 2023

I am using this crate in the tauri mobile framework to authenticate the users when interacting with the ios keychain via security framework. The problem here I believe lies in the crate dependency swift-rs specifically in the link function in build.rs.
This is because the function is trying to build swift-lib from this crate with the swift-package-manager but the swift package manager recognises anything that is darwin as macOS and this cause the swift build to fail if when targeting the ios triple correctly and setting all other flags correctly.

If anyone has any workaround to this issue, or another way to use the localauthentication framework from rust, leave a comment please. Thanks.

@caoimhebyrne
Copy link
Owner

Hi!

At the moment, I don't have support for iOS. However, that's a good idea. I'll try to add support for iOS.

@Zack-Xb
Copy link
Author

Zack-Xb commented Jul 5, 2023

I'd be glad to help. I've been trying to get it to work from the side of swift-rs but no luck with the swift-package-manager, I even tried a local version to remove the macOS correlated to darwin and force iOS but still didn't work.
Thread here and this is the issue with swift-rs.

@Zack-Xb
Copy link
Author

Zack-Xb commented Jul 5, 2023

I was thinking of using objective c to handle the local authentication framework and bind that directly to rust using objc crate

@doroved
Copy link

doroved commented Nov 18, 2023

I was thinking of using objective c to handle the local authentication framework and bind that directly to rust using objc crate

Did you end up solving the problem?

@Zack-Xb
Copy link
Author

Zack-Xb commented Nov 23, 2023

@doroved yes take a look at https://github.com/Zack-Xb/tid-rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants