Am I on the right track?

Hello, I need a little guidance.
I’m new to Solar2D and creating mobile apps too.

I’m thinking about creating an application based on a website, using mainly Bootstrap on the frontend and PHP on the backend. And encapsulate the frontend using Solar2D with its webview.

The purpose of encapsulating in Solar2D is to take advantage of the simplicity of using its webview (with only two lines of code!), And the possibility of Solar2D being able to “chat” with Google Firebase for notifications, even with the application closed.

Thus, the notifications programming would be in Lua, in Solar2D, and the other programming would be the same as maintaining a responsive website - one that is already ready - and would avoid rework.

Is this kind of approach plausible?

Will I have problems when trying to register in stores (Google and Apple) with this technique?

They used to say no but over time they are being more flexible if the web app looks and feels like a native app. Simply framing an existing website will probably not get approved.

1 Like

My goal is to have less code on different platforms to maintain. If I can reuse what is ready, it will be better.
I read a little about Cordova, as I understand it I have to have the code in HTML, Javascript and CSS. To use it, I would have to rethink and convert the user interface from PHP to HTML and try to solve the treatment and persistence of the data using Javascript and Ajax with calls to PHP on the server.
That would be rework, but maybe it’s even lesser rework than if I had to learn another language like React or Flutter.
Already using the approach I thought at the beginning of the post, using Solar2D I have to learn Lua (which seems to be quite simple) and would leave the rest almost intact within the WebView.
Am I risking too much or has anyone done this before?

I personally wouldn’t go that route. For one thing, Apple and Google haven’t always looked kindly at apps that behave like you are describing. They may be alright with them now, or at least not aggressively policing them, but that may change at some point.

Also, in terms of performance, security, aesthetics, general user experience, etc. I doubt you can maximise them via this webview approach. What you are talking about is likely possible, but I wouldn’t adopt such a path. I’ve never used an app that was just a fancy webview that I enjoyed.