Kioskys

MDM 文档

Kioskys 支持受管 App 配置(Managed App Configuration)。你的 MDM 会向 App 下发一份包含键的 plist;你设置的任何键都优先于用户输入的内容,且用户无法更改。所有键均为可选。

所需条件

键

键类型取值作用
kioskURL字符串地址自助终端的网站。未写协议时自动添加 https://(IP 和本地网络添加 http://)。
autoStartSeconds整数0, 或 3–120启动倒计时的秒数。0 = 不显示设置界面,自助终端立即启动。默认 10。
settingsPIN字符串4–8 位数字保护设置的 PIN。用户无法修改或移除。请写成字符串,以保留开头的 0。
allowUserConfiguration布尔值true / falsefalse = 设置界面为只读。默认 true。
allowedHosts字符串数组主机名页面可额外跳转的域名(例如外部登录)。只写主机名,不含协议和路径。
allowCamera布尔值true / false允许已配置网站的页面使用相机。默认 true。
allowLocation布尔值true / false允许使用位置。为 false 时,navigator.geolocation 返回“已拒绝”。默认 true。
staleReloadMinutes整数0–1440在后台停留多少分钟后,返回时页面会重新加载。0 = 从不。默认 0(关闭)。
orientation字符串auto, portrait, landscape屏幕方向锁定(竖屏和横屏也允许 180° 翻转)。默认 auto。
energySaverEnabled布尔值true / false节能:在设定的分钟数内无触摸,屏幕亮度降到 5%;触摸后恢复 100%。默认 true。
energySaverMinutes整数1–120降低亮度前无触摸的分钟数。默认 5。
deviceName字符串1–80 个字符设备名称,页面可通过 window.Kioskys.deviceName 读取。
openingHours字典mon … sun, daily营业时间。每天取值为 "HH:mm-HH:mm"、"24h" 或 "closed";未列出的日子视为关闭,除非给出 daily。空字典 = 始终开放。关闭时间早于开放时间表示营业到次日。
closedMessage字符串最多 200 个字符关闭画面上显示的文字。
idleResetSeconds整数0, 或 10–3600无触摸(或无按键)达到这么多秒后,自助终端回到首页。0 = 关闭。默认关闭。
idleResetClearData布尔值true / false重置时同时清除 Cookie 和网站数据。默认 true。
playlist字典数组type, url, seconds, muted播放列表模式:网页、照片和视频轮流循环显示(最多 50 项)。type:page、image 或 video;seconds:3–3600(视频填 0 = 播放到结束);muted:true 让视频静音。照片和视频会下载并保存在 iPad 上,因此播放无延迟。取代 kioskURL。空数组 = 经典自助终端。
closedBrightness整数0–100关闭期间的屏幕亮度(百分比)。默认 5。
closedMedia字典type, url关闭期间显示的照片或视频:{type:image 或 video,url}。会下载并保存在 iPad 上;视频循环播放。空字典 = 标准关闭画面。
bridgeEnabled布尔值true / falseJavaScript 桥接(window.Kioskys.scan、beep)。默认 true。
disablePageZoom布尔值true / false禁止页面缩放:双指张开、双击以及页面自身的 viewport。默认 true。
scannerCamera字符串front, backKioskys.scan() 使用的相机。默认 front。
energySaverBrightness整数0–100节能功能调暗屏幕后的屏幕亮度(百分比)。默认 5。如果使用屏幕保护程序,可调高。
screensaverEnabled布尔值true / false屏幕保护程序:节能功能调暗屏幕期间,显示照片或视频以代替自助终端;触摸屏幕即可回到自助终端。它没有自己的计时器或亮度。默认关闭(若发送 screensaverMedia 而不带此键,则自动开启)。
screensaverMedia字典type, url屏幕保护程序的照片或视频:{type: image 或 video, url}。会下载并保存到 iPad;视频循环播放,且不带声音。空字典 = 无内容(屏幕保护程序不会启动)。
customCSS字符串≤ 100 000添加到自助终端网站每个页面(以及 allowedHosts 中域名的页面)的 CSS,不会应用于网站重定向到的第三方页面。在页面显示之前生效。
customJS字符串≤ 100 000在自助终端网站每个页面(以及 allowedHosts 中域名的页面)加载完成后运行的 JavaScript;可使用 window.Kioskys。错误会输出到页面控制台。使用 customJS 时,由你的 MDM 决定自助终端中运行什么:请像编写自己网站的代码一样谨慎。

注意事项

现成文件

这些描述文件已包含 Bundle ID app.consulenza.kioskys。使用前请重新生成它们的 UUID(uuidgen)。文件中的注释为英文。

配置示例

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
  Kioskys - Managed App Configuration
  Paste this dictionary into the "App Configuration" field of your MDM, for the app with the Bundle ID
  app.consulenza.kioskys. All keys are optional: keep only the ones you need.
  A key that is present wins over what the user set by hand, and the user cannot change it.
-->
<plist version="1.0">
<dict>
	<!-- Kiosk address. Without a scheme https:// is added (http:// for IPs and local network). -->
	<key>kioskURL</key>
	<string>https://example.org/kiosk</string>

	<!-- Seconds of the start countdown: 0 = no settings screen, the kiosk starts immediately; otherwise 3-120. -->
	<key>autoStartSeconds</key>
	<integer>0</integer>

	<!-- PIN protecting the settings (string of 4-8 digits). The user cannot change or remove it.
	     Note: it is in clear text inside the profile (MDM administrators can see it). It is not stored on the device. -->
	<key>settingsPIN</key>
	<string>4821</string>

	<!-- false = the settings screen is read-only (no local changes). Default: true. -->
	<key>allowUserConfiguration</key>
	<true/>

	<!-- Extra domains the page may navigate to (e.g. an external login). Host names only, no https:// and no paths. -->
	<key>allowedHosts</key>
	<array>
		<string>login.example.com</string>
	</array>

	<!-- Camera and location granted to the pages of the configured site. Default: true. -->
	<key>allowCamera</key>
	<true/>
	<key>allowLocation</key>
	<true/>

	<!-- Minutes in the background after which the page reloads on return (0 = never). Default: 0. -->
	<key>staleReloadMinutes</key>
	<integer>0</integer>

	<!-- Screen orientation lock: auto (free), portrait or landscape.
	     Portrait and landscape also allow the 180-degree flip. Default: auto. -->
	<key>orientation</key>
	<string>landscape</string>

	<!-- Energy Saver: after energySaverMinutes without touches the brightness drops to energySaverBrightness (default 5%); a touch restores 100%.
	     Default: on, 5 minutes. Minutes: 1 to 120. Brightness: 0 to 100. -->
	<key>energySaverEnabled</key>
	<true/>
	<key>energySaverMinutes</key>
	<integer>5</integer>
	<key>energySaverBrightness</key>
	<integer>30</integer>

	<!-- Device name, visible to pages as window.Kioskys.deviceName (max 80 characters). -->
	<key>deviceName</key>
	<string>Warehouse iPad 1</string>
	<!-- Opening hours: mon..sun (or daily) as "HH:mm-HH:mm", "24h" or "closed". Days not listed are closed unless daily is given.
	     An empty dictionary means always open. Outside the hours the kiosk shows a closed screen at minimum brightness. -->
	<key>openingHours</key>
	<dict>
		<key>daily</key>
		<string>08:00-20:00</string>
		<key>sun</key>
		<string>closed</string>
	</dict>
	<key>closedMessage</key>
	<string>We are closed. See you tomorrow!</string>
	<!-- Closed screen: brightness in percent (default 5) and an optional photo or video that is downloaded and saved on the iPad.
	     Use <dict/> for the standard closed screen (moon and message). -->
	<key>closedBrightness</key>
	<integer>40</integer>
	<key>closedMedia</key>
	<dict>
		<key>type</key><string>image</string>
		<key>url</key><string>https://example.org/closed.jpg</string>
	</dict>
	<!-- Inactivity reset: after this many seconds without touches the kiosk returns to its first page (0 = off; 10-3600). -->
	<key>idleResetSeconds</key>
	<integer>120</integer>
	<key>idleResetClearData</key>
	<true/>
	<!-- Playlist: pages, photos and videos shown in turn, in a loop (up to 50). It replaces kioskURL when present; an empty array = no playlist.
	     seconds: 3-3600; for a video 0 means "until it ends". -->
	<key>playlist</key>
	<array>
		<dict>
			<key>type</key><string>page</string>
			<key>url</key><string>https://example.org/menu</string>
			<key>seconds</key><integer>30</integer>
		</dict>
		<dict>
			<key>type</key><string>image</string>
			<key>url</key><string>https://example.org/offer.jpg</string>
			<key>seconds</key><integer>10</integer>
		</dict>
		<dict>
			<key>type</key><string>video</string>
			<key>url</key><string>https://example.org/promo.mp4</string>
			<key>seconds</key><integer>0</integer>
			<key>muted</key><true/>
		</dict>
	</array>
	<!-- JavaScript bridge (window.Kioskys.scan / beep) and the camera used for scanning: front or back. -->
	<key>bridgeEnabled</key>
	<true/>
	<!-- Blocks page zoom: pinch, double-tap and the page's own viewport. Default: true. -->
	<key>disablePageZoom</key>
	<true/>
	<key>scannerCamera</key>
	<string>front</string>
	<!-- Screensaver: while the Energy Saver has dimmed the screen (energySaverMinutes/energySaverBrightness) this photo or video is shown; a touch brings the kiosk back. It has no timer of its own. -->
	<key>screensaverEnabled</key>
	<true/>
	<key>screensaverMedia</key>
	<dict>
		<key>type</key><string>video</string>
		<key>url</key><string>https://example.org/screensaver.mp4</string>
	</dict>
	<!-- Custom CSS and JavaScript, applied to the pages of the kiosk site (not to third-party pages). Up to 100000 characters each. -->
	<key>customCSS</key>
	<string>.cookie-banner { display: none !important; }</string>
	<key>customJS</key>
	<string>document.documentElement.classList.add('kiosk');</string>
</dict>
</plist>