Wondering if someone can someone point me in the direction to help me make a native app save data to my server?
With iOS15 not allowing sqlite use in PWAs, am I correct in thinking my app, deployed as a native ios app, will use sqlite? I just need to know how this app will access my server.
Itās indirectly related. As sqlite is not supported in iOS I need to develop a native app. Consequently I need to know how to get data to and from my server from a native app. Iām confident with Ajax just not sure how to implement it in a native app.
Yes, thats the part Iāve no idea about. I was looking over online AS docs, tech examples etc but couldnāt find any documentation explaining what to do exactly. Is there anything youāve done there Iāve missed?
First, lets stop saying that SQLlite isnāt supported in iOS. It is. Itās not supported in Safari browsers which your PWA requires because it was deprecated years ago in exchange for innodb. Just because Chrome hasnāt removed it yet, doesnāt mean they wonātā¦ itās scheduled to be fully deprecated in M94 (Sept 2021) and removed in the next version.
As for your Content-Security-Policy, Iāve posted several examples on here as have other people. If you search for CSP you should find a bunch of examples. Also note, your server has to be https and you have to return some stuff in a header or your server side scripts will fail.
From my, perhaps misguided, experience trying a new native SQLite app on IOS since I upgraded to IOS15 I have found the following:
A new app using the same SQLite code as used in an existing app works to create the database on the first opening after installation, but will not run any further SQL commands in the code. E.g., wonāt populate a table with some data using a simple INSERT statement.
Opening the new app a second time after installation gives the error : āError: Web SQL is deprecatedā
Rebuilds of existing IOS SQLite database apps work - as long as I donāt delete the app first!
Created a new project to copy of the sample SQL solution 3. Created a new form in the new project and copied the code from the sample 3.
No dice with running SQL in the browser (or native app, I suspect). Threw an error on Button 1: "Uncaught ReferenceError: Right is not defined. line 21 column 13"
and on Button 2: "SQL error"
So I went and checked every detail of the sample directory files versus my new project.
Found that replacing the line: "libraries": [],
with "libraries": [ āBASICā ],
in the .project file fixed the problem.
Regards.
UPDATE: ā¦which I now realise I could have done by clicking the BASIC library in the files properties. Whoops! Mea culpa