Learn R Programming

shinyMobile (version 2.0.0)

preview_mobile: Allow to preview a given app on different devices.

Description

Allow to preview a given app on different devices.

Usage

preview_mobile(
  appPath = NULL,
  url = NULL,
  port = 3838,
  device = c("iphoneX", "galaxyNote8", "iphone8", "iphone8+", "iphone5s", "iphone5c",
    "ipadMini", "iphone4s", "nexus5", "galaxyS5", "htcOne"),
  color = NULL,
  landscape = FALSE
)

Value

A shiny app containing an iframe surrounded by the device wrapper.

Arguments

appPath

App to preview if local.

url

App to preview if online.

port

Default port. Ignored if url is provided.

device

Wrapper devices.

color

Wrapper color. Only with iphone8 (black, silver, gold), iphone8+ (black, silver, gold), iphone5s (black, silver, gold), iphone5c (white,red , yellow, green, blue), iphone4s (black, silver), ipadMini (black, silver) and galaxyS5 (black, white).

landscape

Whether to put the device wrapper in landscape mode. Default to FALSE.

Examples

Run this code
if (interactive()) {
 library(shiny)
 library(shinyMobile)
 preview_mobile(appPath = "~/whatever", device = "galaxyNote8")
 preview_mobile(url = "https://dgranjon.shinyapps.io/miniUI2DemoMd", device = "ipadMini")
}

Run the code above in your browser using DataLab