PricingBlog

Web-App-Manifest

  • babette___-1527402909933895690

    Bernadette

    28 days ago

    Hello! Wie liefere ich in meinem Projekt eine statische Datei unter /manifest.json aus? Ich brauche ein Web-App-Manifest, damit die App auf iOS im Standalone-Modus bleibt auch die Unterseiten. Im Editor kann ich nur Seiten, Formeln, Actions, Themes und Services anlegen.
  • max.kayr-1527562736874160179

    Max

    27 days ago

    Hey! Please stick to English so that everybody can understand 🙂
    You can add the manifest and the service worker in the left sidebar. Both files need to be hosted somewhere. Hope this helps!
    1527562736731426876-image.png
  • babette___-1527600816377040977

    Bernadette

    27 days ago

    Thank you!! Two follow-ups so I get this right 😬

    1. When I add the manifest in the left sidebar, does Nordcraft serve
    the file from my own project domain, or does it just insert a
    <link rel="manifest"> pointing to wherever I host it?

    I ask because scope and start_url must be same-origin with the
    manifest URL. If I host the manifest on a different domain, my
    scope resolves to that domain and all my pages end up out of
    scope — which is exactly the bug I'm trying to fix (URL bar
    appearing on subpages on iOS).

    2. Same for the service worker: it can only control pages on its
    own origin, so it can't be hosted elsewhere either. Is there a
    way to serve it from my project's domain?

    My goal is only display: standalone on iOS. If the manifest alone
    does that, I'll skip the service worker.
  • max.kayr-1527612697225592913

    Max

    27 days ago

    Nordcraft will proxy the files, so they are served from your project's domain: yournordcraftprojectwebside.de/serviceWorker.js and yournordcraftprojectwebside.de/manifest.json.
    BTW: You can set the scope and start URL in a manifest with a relative path like /
  • babette___-1527984378645315632

    Bernadette

    26 days ago

    Thank you!! That was very helpful. 🙏
  • babette___-1527989267018678333

    Bernadette

    26 days ago

    Hi again, and thanks once more for the earlier help, that
    already got me a good step further.

    One follow-up on the manifest: I pasted the JSON into the App
    manifest field and published to main. But /manifest.json
    returns 404 — both on my custom domain and on the branch
    preview (.nordcraft.site). The field is definitely filled.

    What actually makes Nordcraft serve /manifest.json? Is there
    a setting to enable, or does the proxy need to be activated
    per project?

    Thanks a lot!
  • erikbeus-1527997887940788254

    Erik Beuschau

    26 days ago

    I believe a custom manifest is only available on paid projects. Is your project a paid project?
  • max.kayr-1528033465143005205

    Max

    26 days ago

    You cannot paste the JSON in that tiny field. It has to be a URL to a JSON that you host somewhere else. Nordcraft does not do the hosting.
  • babette___-1528345856900599890

    Bernadette

    25 days ago

    Thank you. Now I got it.
  • Tod-1528345860981784576

    Tod

    25 days ago

    Great job @Bernadette! Your contribution to the Nordcraft Community just made you advance to Community Level 1! 🌲