Dynamic PWA image and app title

I’m not sure about the custom (own) manifest. If you provide a reference to that, then I might have a look. By deafult afaik, it is not possible to bind dynamic values, without code export, and it hasn’t been announced officially that you can do your own manifests, right?

Edit, found your comment here

Then yeah, if WeWeb recognizes this and honors this, and of course if you manage somehow to write to the WeWeb’s file system, then you can have a dynamic behavior. But I’m not sure if it’s possible to go and overwrite this dynamically, because you’d be overwriting the one file all over and over again, which might cause conflicts - could cause a racing condition, where two tenants overwrite the manifest in simple terms. This can be handled with Code Export, but within WeWeb, I think it would be difficult.

You could try this javascript - How to create dynamic manifest.json file for PWA in ReactJS? - Stack Overflow, but it would require sticking that JS into your app and hoping that the way it’s set up is gonna work. Of course if you don’t make it work, by modifying the exported code. Edit 2: This won’t work, I just tried it out

What you could do, is store somewhere the static files to your manifests, or generate them on demand, and then with some JS change the source of the manifest. But the answers suggest that you’d probably need to serve it a static file.

I think you’d be better off by exporting the code and doing this dynamically there. Seems like any of the “quick” methods to set the manifest dynamically don’t work.

1 Like