My question is, Is it possible for the Users to acquire these changes without having to REINSTALL the PWA application?
I have a PWA application deployed in Production. The client already installed the deployed PWA application in their MOBILE devices and I want to DEPLOY another patch of updates in the PWA application in the HTTP server.
Another simple way to update application is using workbox-window. You can detect updates in PWA and restart your application to get the last updates. For more detail, I suggest you read this link
I would suggest to read this link explaining in detail how the SW Updates work.
Long story short, if you deploy a new app version, the new SW will be installed on the client's side (using a separate/dedicated install event) and then activated when the users navigates to an URL different from the PWA one.
There is also a built in service workers feature called "fail safe". Within at most 24H the SW checks if a newer version is available and, if so, attempts to update to it.
I wrote a PWA series and here a post about Service Workers and caching strategies if you want to read more.
Related
I am creating a React JS PWA web app, so that the users can install it on their mobile devices. Now the client ask to find out a way to push these PWA apps to amazon app store. So my query is whether we have tools for converting the Progressive Web Apps as APK or HTML5 Web app files so that we can put them to amazon app store.
I googled a bit and I am confused, but I am not sure which one is the right one to use and whether we can publish a PWA app to the amazon app store
Any help on this will be very grateful.
Thanks.
PWA needs a browser to be executed. So if you want yo package your pwa as apk(android) you will need to implement a kind of mini-browser with pure android.
Fortunately, this task is very common and there are even online services to do that:
https://appmaker.xyz/pwa-to-apk/
https://pwatoapp.com/
Or if you know java:
https://github.com/xtools-at/Android-PWA-Wrapper
Or c++
https://github.com/RikudouSage/PwaToTwa
Or nodejs
https://github.com/pwa-builder/CloudAPK
You can use the Amazon Web App Tester to verify how your Web app behaves when Published to the Amazon App Store: https://developer.amazon.com/docs/fire-tablets/webapp-app-tester.html
If it performs correctly in the tester, you can then publish the URL directly or upload your files. The full process is described here: https://developer.amazon.com/docs/app-submission/publish-app-webapp-files.html
Are push notification supposed to work only if the PWA is installed?
If I load the app in android chrome browser, push notifications are not displayed at all (background or having the site opened) even they come thru the wire.
If I install the app, all notifications are displayed properly (background or focused app).
Is this normal a behaviour or something wrong in the implementation?
This is as expected.
The service worker runs on a separate thread than the one used by your application. This is the reason why your web app can still receive and display notifications even if you (or your user) is not currently visiting the web site.
Therefore if the PWA is not installed (meaning the SW is not running on the client side), there is no code waiting for the incoming notifications.
I wrote an article about service workers, if you want to deepen the PWAs topic.
UPDATE
There is an article specifically from OneSignal about not receiving Push Notifications on Android, maybe you can find some hints. If you check the OneSignal dashboard, can you see your client registered there?
[This point is for other users landing to this question] If your browser does not show web notifications, you can verify on "Can I Use" web site that your browser version supports notifications and push API and eventually update it.
I have the following situation:
I have a react web application that is deployed on an NGINX web server via Jenkins. In some cases, my web application does not show up in the browser after I deployed a new version of the application. When you open the web application, it only shows a text: "Loading...".
A quick solution to this problem is to delete your browser data and refresh the web application.
My question: What is the possible cause for this problem or how can I find out what the cause is? I don't want that the users of this application have to delete their browser data when I deploy a new version.
From my experience, It could be because of several reasons:
1) The javascript could be breaking.
2) You might be using some caching strategy that causes the javascript to be cached. Service worker for example.
3) Problem with your react router configuration.
4) A network call might be taking too long to respond.
Need a minimum reproducible example to debug further.
I'm trying to implement a form of deferred deep linking where a user follows a Universal Link and gets sent to my web site because they do not have the app installed. What I want to do is the following, but I am unsure how to do it:
When they land on the web site, I will create a cookie with information pertinent to how they got there.
I will then direct them to the App Store to install the app.
When they install the app and open it, I should be able to read the previously created cookies to figure out where to direct them in the app.
Step 1 and 2 are easy, but I'm not sure how to read cookies from Safari on iOS and Chrome on Android (presumably no other browser would even be possible) from React Native.
I am new to react-native world. Following few tutorials, I found that it react-native app runs on javascript engine on mobile. I am following ios tutorial. So when I go to localhost:8081/index.ios.bundle it loads JS for the app. I know I can use ngrok to manipulate this URL.
I have multiple concerns with this:-
If I change the URL of js from something local to something remote, this would result in a completely new app and now I don't need to go through the App Store to upgrade my app version. Can this be a potential issue in the future?
Since anybody can open this JS in a browser which might have important information like client id and secret for the app, can this be an issue as well?
I am not 100% sure. You can indeed update hybrid app easier and if it is only a quick fix you don't need to go through apple store verification process. Apple can also delete your app and ban you if you don't follow guidelines. Usually your js is local in production for instant app start time, and the network is used only for fresh data.
This is solved with an authentication mechanism.