Search code examples
iosswiftmobile-safarihomescreenappicon

Create a shortcut on iOS Homescreen from my App (post iOS 16)


I want to offer my users to create shortcuts on the homescreen on iOS to content in my app.

Previously there was a workaround using safari with website embedded into a data: URI, but now on newer iOS versions (>=16), safari refuses to load websites from data: URIs. Is there some new method that works similarly easy or even easier (less steps) for users?

As far as I know there are only 2 ways for users to create new icons on the homescreen:

  • Safari -> Share -> Add to Homescreen, to do it from your app you open a data: scheme link
  • Share and Add to Homescreen from the Shortcuts app -> kinda tedious for the user and I don't know if there is a way to create a shortcut from my own app and offer to install it, because they all seem to require some signing from apple when sharing.

There are some icon replacer/theme apps in the appstore, the ones I tried worked by the safari data: method, which is now broken/forbidden on newer versions of iOS 16.

Alternatives considered:

  • Widgets as shortcut links are too big for my usecase.
  • using a webserver that redirects instead of the data: scheme does not work for me, because I don't want to maintain a server and it would probably not work offline (I had mixed experience with offline PWAs on iOS before, sometimes they were cached, other times their cached version was suddenly deleted, but maybe it has gotten better lately, I last tried 6 years ago)

Solution

  • Right now, there's no easy one-click way to replace that Safari trick for making Home Screen shortcuts. You can use Apple's Shortcuts app to do something similar, but it's a bit of a hassle.

    One workaround you might try is making a web app and directing users to create a Home Screen shortcut from there. You'd still be using Safari, but you'd sidestep the need for a web server. Just keep in mind, this won't work if the user is offline.

    Another option are widgets. These are like mini apps that live right on your home screen. They're smaller than a full app but can be a quick way for users to tap into your content.

    I hope that clears things up!