Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rinterface/shinymobile
shiny API for Framework7 (IOS/android)
https://github.com/rinterface/shinymobile
android hacktoberfest2022 pwa r shiny shinyapps template
Last synced: 3 days ago
JSON representation
shiny API for Framework7 (IOS/android)
- Host: GitHub
- URL: https://github.com/rinterface/shinymobile
- Owner: RinteRface
- Created: 2018-06-29T19:13:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T12:29:04.000Z (7 months ago)
- Last Synced: 2024-04-13T21:56:06.145Z (7 months ago)
- Topics: android, hacktoberfest2022, pwa, r, shiny, shinyapps, template
- Language: R
- Homepage: https://shinymobile.rinterface.com
- Size: 55.4 MB
- Stars: 377
- Watchers: 16
- Forks: 76
- Open Issues: 50
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# shinyMobile
> Develop outstanding {shiny} apps for iOS and Android, as well as beautiful {shiny} gadgets. {shinyMobile} is built on top of the latest [Framework7](https://framework7.io) template.
[![R build status](https://github.com/RinteRface/shinyMobile/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/shinyMobile/actions)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![CRAN status](https://www.r-pkg.org/badges/version/shinyMobile)](https://cran.r-project.org/package=shinyMobile)
[![Codecov test coverage](https://codecov.io/gh/RinteRface/shinyMobile/branch/master/graph/badge.svg)](https://app.codecov.io/gh/RinteRface/shinyMobile?branch=master)## Installation
```r
# from CRAN
install.packages("shinyMobile")# for the latest version
devtools::install_github("RinteRface/shinyMobile")
```## Demo
A running demo is available [here](https://shinylive.io/r/app/#h=0&code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAdzgCMAnRRAVwhiLdIAoAdMAPQsAzgwEAbAJZ0BWCdIZQGATwHCAFpIjKAskTqTxcfgEpeEWo2ZbhpKOPF8IAAmf8N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ayhhAqg+ZnUCXCHwwAWQPuPCAj64DWsOoQIKtkkCG4lKvhHqpFSNzgV5qrrfnOYLsHCDdQF6TIghDJJlwPB6TTJq6xXQeD4yiZYQMACXIH5YCuAEsm4IkiHgqKgQNQgJHUCJEmu83D4r4QzqLBEiNIXwhjSeDY1UwCHB4r4UJpgAdmoObIThHh6tYJ2d7UJu0kTBDUS0voRoXkKxrCBz4ywciHRwG6YNV2XQ8Hq1lcZToegYAcMLdiAA).
## Sponsors
`{shinyMobile}` is supported/funded by [AthlyticZ](https://linktr.ee/athlyticz).
AthlyticZ offers top notch Shiny courses developed by [Veerle van Leemput](https://hypebright.nl/):
- Productionizing Shiny Applications [course](https://athlyticz.com/shiny-ii).
- Outstanding InterfaceZ with Shiny [course](https://athlyticz.com/shiny-iii).
- Build outstanding mobile applications with shiny [course](https://athlyticz.com/shiny-mobile).## Progressive Web App (PWA)
### Configuration
`{shinyMobile}` is PWA capable, meaning that you can make sure your app uses the correct assets to be used as a PWA. This feature is automatically handled by `f7Page()` if `allowPWA` is `TRUE`.
When set to `TRUE`, your app is set up to use both a `service-worker.js` script and a `manifest.webmanifest` file that you will provide.
To create these necessary assets for your PWA, you can use `{charpente}`:
```r
remotes::install_github("RinteRface/charpente")
library(charpente)
set_pwa(APP_PATH, ...)
```Where `APP_PATH` is the app location. Currently, it only works if the app is **inside a package** like with [`{golem}`](https://github.com/ThinkR-open/golem). If your app is not in a package, you may copy the `www` folder of the [gallery app](https://github.com/RinteRface/shinyMobile/tree/master/inst/examples/gallery/www), which provides:
- A valid `service-worker.js`.
- A valid web manifest (`manifest-webmanifest`). Don't forget to change the `start_url` property to the path of your app.
- As a bonus a valid `offline.html` fallback, which is displayed when the app is offline.
- A valid set of icons. There are tools such as [appsco](https://appsco.pe/developer/splash-screens) and [app-manifest](https://app-manifest.firebaseapp.com), to create
those custom icons and splash screens, if you need to.It is really easier with `{charpente}`, the reason why we strongly recommend to develop your app inside a package.
But that's not all that's needed! When you set `allowPWA = TRUE` in `f7Page()`, the app will also attach the [Google PWA compatibility script](https://github.com/GoogleChromeLabs/pwacompat), called PWACompat, which will help with PWA compatibility. More specifically, PWACompat brings the Web App Manifest to non-compliant browsers for better PWAs. This mostly means creating splash screens and icons for Mobile Safari, as well as supporting IE/Edge's Pinned Sites feature. It basically assures that the `manifest.webmanifest` file has a wider support.
### Using your PWA
The first step is to deploy your app somewhere. It doesn't matter where (shinyapps.io, Posit Connect, your own server, etc.), but you will need a URL to access it.
Then, you can follow these steps to install your app on your mobile device.
Copy the URL of your app in your mobile web browser (iOS: Safari and Andoid: Chrome). It opens like a classic web app, with top and bottom ugly navigation bars that are part of the browser UI.- Select the share button located in the bottom bar of your iPhone/iPad For Android, you may do something similar. Importantly, Chrome for iOS does not support this feature, that's why we recommend using Safari.
- Click on "Add to Home Screen"
- Choose a relevant name and click on OK.
- The app will be added to your iOS/Android Apps. In case you want custom icons, replace the content of the www folder with your own.### Limitations
It is actually quite complex to guarantee that all mobile platforms are supported.
The PWA compatibility script will work in most cases. If not, please open an issue [here](https://github.com/GoogleChromeLabs/pwacompat/issues), to help improving it!## Acknowledgement
A special thanks to [Vladimir Kharlampidi](https://github.com/nolimits4web) for creating this
amazing framework7 HTML template.## Code of Conduct
Please note that the shinyMobile project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.