My previous attempt was to use Xamarin and that’s why I started to use MvvmCross and getting it ready to start with Xamarin Android and iOS. I have to say that the app is already published in Windows Phone and Windows Stores using MvvmCross (which I highly recommend) but, just by chance, when I started facing other platforms development I stumbled uppon Unity3d and automatically fell in love with it. After trying some bits of it I decided to discard completely Xamarin and give Unity3d a try.
So far so good, but now problems arise… 😀
There, you will be able not only to find the dll but all the code used to create it and a working Unity Example. So, if you need to modify something you’re free to go.
- Download this zip and copy the resulting folder to your Assets/Plugins folder. It contains the dlls that Unity3d will need to access sqlite.
- Don’t forget to copy your SQLite database file in your Assets/StreamingAssets folder if you’re shipping one.
- You’re done! Now you can get access to your database using sqlite-net. ;P
I hope it works for you! Easy, don’t you think?
Let me know if you have some comments or find any inconveniences. I’ll be happy to help you.
As you may know iOS doesn’t allow JIT compilation so, generally speaking, you will have to be very careful when you use reflection in your code. For a more deeper explanation of this issue please refer to Google but making it short: you cannot create dynamic objects using reflection. How is this affecting SQLite4Unity3d? Well, you can’t use the linq syntax when making queries to SQLite and you will have to use the old sql syntax.