set_pwa | R Documentation |
Creates a web manifest, service-worker.js, icons and set the necessary dependencies. The app must be part of a package. Must not be used from the package root but from the app root.
set_pwa( path, name = "My Progressive Web App", shortName = "My App", description = "What it does!", lang = "en-US", startUrl = "/", display = c("standalone", "minimal-ui", "fullscreen", "browser"), background_color = "#ffffff", theme_color = "#ffffff", register_service_worker = TRUE, create_dependencies = TRUE )
path |
App path. |
name |
App name. |
shortName |
App short name. |
description |
App description |
lang |
App language (en-US by default). |
startUrl |
Page to open at start. |
display |
Display mode. Choose among |
background_color |
The background_color property is used on the splash screen when the application is first launched. |
theme_color |
The theme_color sets the color of the tool bar, and may be reflected in the app's preview in task switchers. |
register_service_worker |
Whether to register the service worker. Default to TRUE. Don't change the file name of service-worker.js!!! |
create_dependencies |
Default to TRUE. Relevant if used in a shinyMobile context. If used outside, you must set it to FALSE and handle the dependencies yourself. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.