2shady4u / godot-sqlite

GDExtension wrapper for SQLite (Godot 4.x+)
MIT License
975 stars 83 forks source link

How to use on iOS with Godot 4.x #156

Closed MartijnTijsma closed 9 months ago

MartijnTijsma commented 1 year ago

Is it possible to use this plugin on iOS with Godot 4.x?

I tried the gd-extension branch, but iOS seems to be missing in the gd-extension file.

Thanks for the great plugin.

djordjije commented 10 months ago

I was just able to get it to work. When you install the addon from inside Godot, it appears inside res://addons/godot-sqlite The bin folder, when you browse in the mac file explorer, has the two debug and release libraries for iOS: libgdsqlite.ios.template_debug.arm64.dylib libgdsqlite.ios.template_release.arm64.dylib

However I don't think they were ever added to the gdsqlite.gdextension for iOS. I just edited that file. The new lines I added are prepended here with a + sign for clarity, but not in the actual file.

[configuration]

entry_symbol = "sqlite_library_init"
compatibility_minimum = 4.1

[libraries]

macos = "res://addons/godot-sqlite/bin/libgdsqlite.macos.template_debug.framework"
macos.template_release = "res://addons/godot-sqlite/bin/libgdsqlite.macos.template_release.framework"
windows.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.windows.template_debug.x86_64.dll"
windows.template_release.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.windows.template_release.x86_64.dll"
linux.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.linux.template_debug.x86_64.so"
linux.template_release.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.linux.template_release.x86_64.so"
android.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debug.arm64.so"
android.template_release.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.arm64.so"
android.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debug.x86_64.so"
android.template_release.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.x86_64.so"
+ios.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.ios.template_debug.arm64.dylib"
+ios.template_release.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.ios.template_release.arm64.dylib"

[dependencies]

macos = {}
macos.template_release = {}
windows.x86_64 = {}
windows.template_release.x86_64 = {}
linux.x86_64 = {}
linux.template_release.x86_64 = {}
android.arm64 = {}
android.template_release.arm64 = {}
android.x86_64 = {}
android.template_release.x86_64 = {}
+iOS.arm64 = {}
+iOS.template_release.arm64 = {}
2shady4u commented 10 months ago

Hi @djordjije,

Thank you for reporting this oversight. I have added your changes to the master branch and they should be part of the next release 😄

2shady4u commented 9 months ago

The missing entries have now been added to the latest release. Closing this issue as a result.