SQLite on iOS18

I’m working on an app that I intend to run on iOS18. It’s been awhile but I recall that (and your document states) that SQLite is supported on iOS. An app I previously developed ran on iOS several generations ago. To test, I brought up the SQLSample1 project and ran it locally in Edge with no problems. When I publish this to my web server, however, and run it from Safari on the iPhone I get this:

The project does seem to be using the “WASM” library as it should be so I’m wondering why it isn’t present on the iPhone. Any ideas what I can do here?

Thanks,

SQLite support has indeed been dropped in iOS 18 (as well as the latest versions of Chrome).

Here’s an article on the workaround.

This has been coming for a long time. Here’s where we discussed it in 2019.

OK, thanks. Will have a look. My app needs to have a local DB of some kind, otherwise NSBasic won’t work for me.

  • Sent from my iPhone -

Hey George,

OK, it looks as if SQLExample1 has been updated as stated in the workaround.


From what I understand this should result in SQLite3 being published with my project, right? If that’s the case, then why does the missing library error still take place on the iOS device? There was some mention of “Cordova” being required on the iOS as opposed to the SQLite3. Is that what I’m missing when I publish the project and, if so, how do I include it?

Thanks,

Yes, SQLite WASM is included when that box is checked.

Are you running as a web app or as a native app?

SQLite WASM is for web apps. For native apps, the Cordova plugin is used.

Hey George,

I’m running it as a web app right now. I haven’t learned about how to build native apps for iOS just yet. I’ve been parsing the documentation, where would I find a writeup on how to produce a native app?

Since I have WASM set and am publishing a web app, then what am I missing?

I’m finding the documentation isn’t always up-to-date and is a bit thin on procedure.

Thanks,

-b

Any chance you can zip up your project and send it to me at support@appstudio.dev? I’ll have a look.

I just sent an email with the zipped up SQL example file. Gmail complained that it couldn’t find your email but then it turned up in my sent folder. I wonder if your end has more than one IP address? Did you get this one?

Sorry - no sign of it here.

Try sending to my personal email - gh @ nsbasic.com

Hmm… interesting. Guess gmail is starting to reject ZIP attachments of all things. I’ll send it up to the forum thread.

Trying to send to the discussion thread instead. Since when does Google Mail reject a ZIP file attachment? I’ll have to check the settings on my account.
SQLSample1.appstudio.zip (36.7 KB)

Thanks - got the download.

I just tried your sample and it actually worked OK for me. Here’s the link. Does it work for you?

If not, can you try uploading your app again, but clear the cache in Safari first?

Hey George,

I’m beginning to smell a rat on this one. The app works fine at the link you supplied, however when I deploy the very same project to my server (gracemessage.com/nsbasic/sqlexample1 I get this.

Do you think that, maybe, there’s something about my ftp server that could be blocking the upload of some necessary component? My troubleshooting experience seems to tell me that both this and the problem with Bootstrap seem to be failing only on my server. I seem to remember sometime back that a path on a website had to be set to allow it to be “executable”. I wonder if I’m simply fighting with a setting here? Can you think of any particular setting that might be hanging this up?

I’m going to poke around in my server and see if I can figure this out. I’m becoming pretty convinced that this ain’t your fault at all.

I have access to a server up at NSBasic to post my projects to, right? (Is that what you call your “Volt” server?)

Also, look forward to read your response about Cordova. If there was a way to produce a native executable for an iPhone with this thing it seems to me to be a better route than consuming a web page.

I’ll let you know if I figure anything out.

Thanks,

-bruce

Hey George,

I’m beginning to smell a rat on this one. The app works fine at the link you supplied, however when I deploy the very same project to my server (grace message.com/nsbasic/sqlexample1 I get this.

Do you think that, maybe, there’s something about my ftp server that could be blocking the upload of some necessary component? My troubleshooting experience seems to tell me that both this and the problem with Bootstrap seem to be failing only on my server. I seem to remember sometime back that a path on a website had to be set to allow it to be “executable”. I wonder if I’m simply fighting with a setting here?

1 Like

Ive got a small contract gig that needs to use sqlite as well.

Following this one but Im using JS.

I will try the sample qhen I get home.

OK guys, I just got myself established on the Volt server and deployed both the SQLite project and the one with the icon problem. Both issues work fine when served up from there.

I fiddled with the settings on my own ftp server and couldn’t find anything that would clear the conditions. Perhaps there is a security protocol in force there that’s preventing this from working correctly. Regardless of what it might be it doesn’t matter at this point, I’ll just use the Volt server for this. I can now get back to what I was doing which was developing my app instead of fooling with this! :wink:

Unless you can think of something else to tweak on my server, George, I’m fine with it as it is. I’ll just need to learn the ropes of SQLite now. At least it works.

-bruce

1 Like

@MaxPeck
I tried the sample included with AppStudio and it worked on my server.

If you ever find out why it didn’t run from your server, I’d be interested to know.

Thank you.

James,

It’s not that the projects don’t run from there it’s just that not everything works. It’s really pretty odd. It doesn’t seem to me that there should be any issues, it’s just a web server. Maybe I’ll put in a trouble ticket and see what Winhost says about it. Their knowledge base has nothing about NSBasic in it so I’m just wondering if there are security settings in place that I can’t control at my level. Yeah, I’ll let y’all know.

I see.

It could be something as simple as an .htaccess file that limits the headers.

I’m going to dig into the example a bit more and create a set of CRUD functions for my own needs and see how that goes.