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

iOS and Android support #80

Open
ektrah opened this issue Mar 14, 2022 · 4 comments
Open

iOS and Android support #80

ektrah opened this issue Mar 14, 2022 · 4 comments

Comments

@ektrah
Copy link
Owner

ektrah commented Mar 14, 2022

954f936 removed support for iOS and Android. It would be nice to have it back. This should probably be based on the .NET 6.

@ektrah
Copy link
Owner Author

ektrah commented May 4, 2024

libsodium-core supports iOS, tvOS, and Mac Catalyst starting from version 1.4.0-preview.1.

However, this has not been extensively tested. Please provide feedback in this issue whether it works or not.

Please indicate the target platform (iOS, tvOS, or Mac Catalyst), development platform (macOS, Windows, ...), and .NET SDK used, including version numbers.

Both positive and negative reports are welcome!

@MartyIX
Copy link
Contributor

MartyIX commented May 5, 2024

I tested with .NET MAUI application on Mac Catalyst (arm64) and it seems to work. I tested that with the previous version, I can observe a crash. So I believe the new preview version fixes my issue :)

@Toine-db
Copy link

Toine-db commented May 21, 2024

Seems to work fine on arm64 devices, but on x86_64 simulators it doesn't work out of the box.

It gets following error:
with Sodium.Core" Version="1.4.0-preview.1
target net8.0-ios (8.0.21/8.0.100)

Undefined symbols for architecture x86_64:
  "_crypto_aead_aes256gcm_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_aes256gcm_encrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_aes256gcm_is_available", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_encrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_ietf_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_ietf_encrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_xchacha20poly1305_ietf_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_xchacha20poly1305_ietf_encrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_auth_hmacsha256", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_auth_hmacsha256_verify", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_auth_hmacsha512", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_auth_hmacsha512256", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_auth_hmacsha512256_verify", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_auth_hmacsha512_verify", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_curve25519xsalsa20poly1305_keypair", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_curve25519xsalsa20poly1305_seed_keypair", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_detached", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_easy", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_open_detached", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_open_easy", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_seal", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_box_seal_open", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_generichash_blake2b", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_generichash_blake2b_final", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_generichash_blake2b_init", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_generichash_blake2b_salt_personal", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_generichash_blake2b_update", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_hash_sha256", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_hash_sha512", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_onetimeauth_poly1305", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_onetimeauth_poly1305_verify", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash_scryptsalsa208sha256", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash_scryptsalsa208sha256_str", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash_scryptsalsa208sha256_str_needs_rehash", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash_scryptsalsa208sha256_str_verify", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash_str", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash_str_needs_rehash", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_pwhash_str_verify", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_scalarmult_curve25519", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_scalarmult_curve25519_base", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_secretbox_detached", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_secretbox_easy", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_secretbox_open_detached", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_secretbox_open_easy", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_shorthash_siphash24", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_detached", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_keypair", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_open", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_pk_to_curve25519", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_seed_keypair", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_sk_to_curve25519", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_sk_to_pk", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_sk_to_seed", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_sign_ed25519_verify_detached", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_stream_chacha20_ietf_xor", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_stream_chacha20_xor", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_stream_xchacha20_xor", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_stream_xsalsa20_xor", referenced from:
     -exported_symbol[s_list] command line option
  "_randombytes_buf", referenced from:
     -exported_symbol[s_list] command line option
  "_randombytes_uniform", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_base642bin", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_base64_encoded_len", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_bin2base64", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_compare", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_increment", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_init", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_library_version_major", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_library_version_minor", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_set_misuse_handler", referenced from:
     -exported_symbol[s_list] command line option
  "_sodium_version_string", referenced from:
     -exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

0>Xamarin.Shared.Sdk.targets(1560,3): Error  : clang++ exited with code 1:
Undefined symbols for architecture x86_64:
  "_crypto_aead_aes256gcm_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_aes256gcm_encrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_aes256gcm_is_available", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_encrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_ietf_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_chacha20poly1305_ietf_encrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_xchacha20poly1305_ietf_decrypt", referenced from:
     -exported_symbol[s_list] command line option
  "_crypto_aead_xchacha20poly1305_ietf_encrypt", referenced from:
     -exported_symbol[s_list] comma
 0>------- Finished building project: .....

@tomuxmon
Copy link

FYI: win-arm64 build is not working coming from libsodium nuget

more info here

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

Successfully merging a pull request may close this issue.

4 participants