MDM 文档
Kioskys 支持受管 App 配置(Managed App Configuration)。你的 MDM 会向 App 下发一份包含键的 plist;你设置的任何键都优先于用户输入的内容,且用户无法更改。所有键均为可选。
所需条件
- 一台已加入你的 MDM 的受监管 iPad(单 App 模式需要)。
- 在 Apple Business Manager 中批量购买的 Kioskys(付费 App,分配给你的设备或用户),并由 MDM 作为受管 App 安装:配置只会下发给受管 App。
- App 的 Bundle ID:app.consulenza.kioskys(所有人都相同,无需修改)。
键
| 键 | 类型 | 取值 | 作用 |
|---|---|---|---|
kioskURL | 字符串 | 地址 | 自助终端的网站。未写协议时自动添加 https://(IP 和本地网络添加 http://)。 |
autoStartSeconds | 整数 | 0, 或 3–120 | 启动倒计时的秒数。0 = 不显示设置界面,自助终端立即启动。默认 10。 |
settingsPIN | 字符串 | 4–8 位数字 | 保护设置的 PIN。用户无法修改或移除。请写成字符串,以保留开头的 0。 |
allowUserConfiguration | 布尔值 | true / false | false = 设置界面为只读。默认 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 / false | JavaScript 桥接(window.Kioskys.scan、beep)。默认 true。 |
disablePageZoom | 布尔值 | true / false | 禁止页面缩放:双指张开、双击以及页面自身的 viewport。默认 true。 |
scannerCamera | 字符串 | front, back | Kioskys.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 决定自助终端中运行什么:请像编写自己网站的代码一样谨慎。 |
注意事项
- 以字符串形式发送的数字和布尔值("10"、"true")也会被接受。无效的值会被忽略并报告,绝不会导致 App 出错。
- settingsPIN 在描述文件中为明文(MDM 管理员可以看到)。App 不会把它保存在设备上。
- 在 MDM 中所做的更改会在 App 打开时生效;新的地址会重新加载页面。
- App 会在 com.apple.feedback.managed 中回报状态(版本、地址、页面是否加载、相机和位置权限状态、配置问题)。
- Kioskys 在前台时会让 iPad 保持唤醒。若要阻止他人退出 App,请使用单 App 模式。
- 在屏幕左上角快速点按五次可重新打开设置(allowUserConfiguration 为 false 时只读;若设置了 settingsPIN,会先要求输入)。
- 同样的键在没有 MDM 时也能使用:二维码配置页面会把它们转换成二维码,把设置复制到 iPad。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>