Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA dynamic directory path #78

Open
1 task
0perationPrivacy opened this issue Nov 2, 2021 · 2 comments
Open
1 task

PWA dynamic directory path #78

0perationPrivacy opened this issue Nov 2, 2021 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@0perationPrivacy
Copy link
Owner

0perationPrivacy commented Nov 2, 2021

With the random/custom directory path, the function on mobile to Add to Home Screen does not add the directory as it's statically definded in the manifest file. This gives an error when you open the PWA as it's not taking into account your custom directory.

  • Generate the manifest file dynamically based on the directory to put the directory path under start_url attribute.

ref: https://technowhisp.com/dynamic-pwa-manifest/

@0perationPrivacy 0perationPrivacy added bug Something isn't working enhancement New feature or request labels Nov 2, 2021
@0perationPrivacy 0perationPrivacy self-assigned this Nov 2, 2021
@noteloni
Copy link

Related, but when adding a custom 'APPDIRECTORY' environment variable, it just keeps returning 404?

@0perationPrivacy
Copy link
Owner Author

Related, but when adding a custom 'APPDIRECTORY' environment variable, it just keeps returning 404?

This issue is almost always because of caching. I faced it as well. Try a different browser, incognito mode and enter the URL with the sub-directory. Without the sub-directory in the path, it will always give a 404 when that variable is configured.

When you set the variable in Heroku, wait 30 seconds, then try the new URI in a clean browser.
Let me know if that worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants