So, in the last 4 days. I have been working on a project for a contest in Romania.
My competition idea says something like that:
- I have to build a mobile application for a small town (~30K peoples), that will let a user, to temporarily hire another user, to do different kinds of jobs, like bringing you food, walk the dog, do the shopping, babysitting, bringing the clothes to the laundry, and other activities that require a small amount of movement
The project started with a simple back-end structure, written in Node.JS and a NuxtJS Project.
After finishing the design for some basic screens (Splash, login, register),
I've built the HTML and CSS for the Splash screen as a component inside the NuxtJS project, then inside the
layout/default.vue, I wrote a script that switches a variable from true to false.
v-else, I was able to show my Splash for 3000 ms, then the Nuxt router view.
Everything was perfect! For now...
Meanwhile, I've created a Cordova project and generate the first
dist/ folder. After moving the generated files from
dist/ inside the
www/ folder of the Cordova project, I added Android as the platform and build the first demo.
I ran it and surprise the splash screen wasn't working
The next day I gave up on NuxtJS after finding some Github issue about that (which I wasn't able to find the day before, because of being tired), which tells you NuxtJS is not compatible with Cordova.
I used just VueJS instead of NuxtJS, which I chose first just because I am more familiar with it.
I've built a new project using Vue-CLI and Cordova. After that, I've built again the Splash screen and this time, the Login screen.
Meanwhile, I integrated
vue-route-middleware to help me build easier middlewares in an elegant style, and set the mode to
After that, I've built a middleware that redirects to
/login if a state variable is empty.
And then I've repeated the app-building process.
Well, now redirecting was not working! The App punched me in the face, again. I gave up on it. The next day I tried Ionic with React, and here I failed, because the docs weren't clear about the status bar plugin... that was another problem!
That night I found a Github issue to the same problem that I had with the VueJS + Cordova pack, and that issue topic was talking about the fact that Cordova is not able to redirect a Vue build application, that is using
- You should always check for a solution online, do not waste your time. Some frameworks things might not be documented!
- It is my first mobile app project using VueJS and Cordova, and I learned a lot from basic things.
- Always you should learn from your mistakes.
- You should always keep learning, doing what you love to do
- Remember FAIL means "First Attempt Into Learning!"
About the project, if anybody is curious it will be open source in the next months on my Github 😀