Forum Xamarin.iOS

Using Sqlite on WatchOS/WatchKit ?

Anybody successfully implemented Sqlite into Apple Watch application ? To be specific I would like persistent storage on the watch itself. I know I can add sqlite storage to the phone companion app and CRUD the info with the watch via pull and push using the sendmessage or applicationcontext method but need the storage even when phone is not available.

I have successfully added Sqlite using Sqlite-net package added to the Watch Extension project but it only works in debugger . For Device deploy i get a linker error when building possible missing referencing with the sqlite3 as the culprit.

I have tried various linker options including link all for the extension project and get a good compile and link but the Watch App crashs when deployed to watch.

I read you can use sqlite when using a native Xcode app but the different between iOS and watchOS is the target should include "libsqlite3.tbd" instead of "libsqlite3.dylib" I know the dylib is being used on the debugger version since looking at the logs on the mac i see the reference but not sure how or if I can force the .tdb using Xamarin or even using Xamarin that will fix the issue.

If anyone has done this give shout on how you made it happen, Thx


Sign In or Register to comment.