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

iOS “Add to Home Screen” Incorrect URL #1573

Open
2 tasks done
bliestek opened this issue Apr 27, 2022 · 3 comments
Open
2 tasks done

iOS “Add to Home Screen” Incorrect URL #1573

bliestek opened this issue Apr 27, 2022 · 3 comments
Labels
area:core issues describing changes to the core of uptime kuma area:status-page Everything related to the status page feature-request Request for new features to be added

Comments

@bliestek
Copy link

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

Hi,

I have found an issue where if I were to open a status page, and want to add it to the homescreen of my iOS device, that instead of making the web link https://yourserver.com/status/page1 it will make the shortcut https://yourserver.com instead.

I believe this article relates to it. Looks like that a manifest file needs to be updated to make it work. Is this something that could be fixed to automatically work?

Article: https://apple.stackexchange.com/questions/385417/add-to-home-screen-saves-wrong-url

👟 Reproduction steps

  1. Open Safari
  2. Navigate to your status page (ie. https://yourserver.com/status/page1)
  3. click the Share icon in Safari
  4. Scroll down and select “Add to Home Screen”
  5. When it pops up asking what you want to call it, you can see that the url it is trying to add is https://yourserver.com instead of https://yourserver.com/status/page1
  6. Click Add
  7. Navigate to home screen and open new link
  8. Find that it has directed to https://yourserver.com

👀 Expected behavior

  1. Open Safari
  2. Navigate to your status page (ie. https://yourserver.com/status/page1)
  3. click the Share icon in Safari
  4. Scroll down and select “Add to Home Screen”
  5. When it pops up asking what you want to call it
  6. Click Add
  7. Navigate to home screen and open new link
  8. Opens to specified status page

😓 Actual Behavior

  1. Open Safari
  2. Navigate to your status page (ie. https://yourserver.com/status/page1)
  3. click the Share icon in Safari
  4. Scroll down and select “Add to Home Screen”
  5. When it pops up asking what you want to call it, you can see that the url it is trying to add is https://yourserver.com instead of https://yourserver.com/status/page1
  6. Click Add
  7. Navigate to home screen and open new link
  8. Find that it has directed to https://yourserver.com

🐻 Uptime-Kuma Version

1.15.0

💻 Operating System and Arch

Raspian on RPi4

🌐 Browser

Safari on iOS and iPadOS

🐋 Docker Version

Docker 20.10.14

🟩 NodeJS Version

No response

📝 Relevant log output

No response

@bliestek bliestek added the bug Something isn't working label Apr 27, 2022
@louislam
Copy link
Owner

It is because currently start_url is pointing to /.

"start_url": "/",

If it is needed, I think we need to add a dynamic manifest file.

@louislam louislam added feature-request Request for new features to be added and removed bug Something isn't working labels Apr 27, 2022
@emitosolini
Copy link

Hi @louislam, first time commenting here.

I think it would be really useful to make a dynamic manifest file for the status pages.

As I see it, you can create a handful of different status pages for each group or area and each member can add it to the home screen as needed.

Thanks by the way, really great job!

@emitosolini
Copy link

Maybe this could be a solution...

[...] However, this will also map https://example.com/test/manifest.json to https://example.com/, which fails because it's in a folder outside the scope of the manifest.

Instead, if you are using a sub-directory you need to set both a scope and the start_url:

"start_url": "./"
"scope": "."

This will cause https://example.com/test/manifest.json to map to https://example.com/test/ as expected.

full post on: https://stackoverflow.com/a/56128412

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core issues describing changes to the core of uptime kuma area:status-page Everything related to the status page feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

4 participants