Prompt user to add shortcut to iOS/Android homescreen


#1

Hi,

I’m trying to setup my web-app to prompt a user on initial visit whether or not they would like to add a shortcut of the site to their iOS/Android home screen; essentially a Meteor version of this: https://github.com/cubiq/add-to-homescreen

Any suggestions?


#2

dont tested it but try

  1. save the css file into your css folder (best on client folder) this will be autoloaded
  2. save the js file into your js folder (best on public folder) you have to load it by yourself
  3. add this into your main.html in the client folder to load the js

<script src="/addtohomescreen.js"></script>

  1. in your template.js

Template.templatename.rendered = function () {

addToHomescreen();

}