-
Notifications
You must be signed in to change notification settings - Fork 3.2k
EFCore on Android. Require 'libmod_spatialite' instead of 'mod_spatialite'. #24094
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
Comments
Someone describes the restrictions in more detail: https://developercommunity.visualstudio.com/content/problem/841599/androidnativelibrary-so-files-will-not-deploy-to-a.html |
/cc @bricelam |
Note for triage: Looks like SQLite only adds the extension (dll, so, dylib, etc.) and not the 'lib' prefix like I initially thought. A couple of thoughts... We could expose an option to disable our call to LoadExtension. It's kind of possible today using some lower-level, pubternal APIs: efcore/src/EFCore.Sqlite.NTS/Extensions/SqliteNetTopologySuiteDbContextOptionsBuilderExtensions.cs Lines 27 to 36 in 91655d5
This would be helpful in this scenario, but also if you're using SpatiaLite directly as your native SQLite library (not as an extension). We could also try loading libmod_spatialite.so if the just mod_spatialite fails (similar to how .NET probes during P/Invoke). We could also detect if we're running on Android at runtime and only look for libmod_spatialite... P.S. I'd love it if you could look through bricelam/mod_spatialite-NuGet#6 and add any additional information you might have. |
I switched the last to |
Hi,
I cannot use EF Core on Android device, cause I cannot deploy 'mod_spatialite' with APK.
I see Android only allows me to deploy *.so files with the name starting with "lib".
And, in:
efcore/src/EFCore.Sqlite.Core/Infrastructure/SpatialiteLoader.cs
Line 100 in b848377
we specifically require the name, without the 'lib'.
Is it possible to change the name, to allow it to be used on all platforms?
The text was updated successfully, but these errors were encountered: