You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For it to work, I had to edit NSec, remove the reference to libsodium and edit src/Interop/Interop.Libraries.cs, changing "libsodium" to "libsodium.so", then use that edited NSec with MAUI.
After that, I had to compile libsodium from source for android, grab the .so it built (the files along with it, like libsodium.a etc. aren't needed) and then put it inside the project, inside a folder called "arm64-v8a" that's inside a folder called "lib". The libsodium.so also had to have BuildAction of AndroidNativeLibrary.
The reason I had to remove the reference to libsodium was because, with it, the compiler would add the libsodium.so for linux aarch64 and not our custom android one, which the libsodium nuget package didn't contain. The reason Interop.Libraries.cs had to be modified was because MAUI wouldn't find "libsodium" if it was passed to DllImport, but it would find libsodium.so.
The text was updated successfully, but these errors were encountered:
Hello,
I got NSec working on Android.
For it to work, I had to edit NSec, remove the reference to libsodium and edit src/Interop/Interop.Libraries.cs, changing "libsodium" to "libsodium.so", then use that edited NSec with MAUI.
After that, I had to compile libsodium from source for android, grab the .so it built (the files along with it, like libsodium.a etc. aren't needed) and then put it inside the project, inside a folder called "arm64-v8a" that's inside a folder called "lib". The libsodium.so also had to have BuildAction of AndroidNativeLibrary.
The reason I had to remove the reference to libsodium was because, with it, the compiler would add the libsodium.so for linux aarch64 and not our custom android one, which the libsodium nuget package didn't contain. The reason Interop.Libraries.cs had to be modified was because MAUI wouldn't find "libsodium" if it was passed to DllImport, but it would find libsodium.so.
The text was updated successfully, but these errors were encountered: