MDMドキュメント
Kioskysは管理対象Appの設定(Managed App Configuration)に対応しています。MDMがキーのplistをアプリに配信します。設定したキーはユーザーが入力した内容より優先され、ユーザーは変更できません。すべてのキーは任意です。
必要なもの
- MDMに登録された監視対象のiPad(シングルAppモードに必要)。
- Apple Business Managerで一括購入したKioskys(有料アプリ。デバイスまたはユーザーに割り当て)を、MDMが管理対象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 は「denied」を返します。既定値は true。 |
staleReloadMinutes | 整数 | 0–1440 | バックグラウンドにあった時間(分)。これを超えると、戻ったときにページを再読み込みします。0 = しない。既定値は0(オフ)。 |
orientation | 文字列 | auto, portrait, landscape | 画面の向きの固定(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 を指定しない限り休業です。空の辞書 = 常に営業。終了時刻が開始時刻より早い場合は深夜0時を過ぎても営業します。 |
closedMessage | 文字列 | 200文字まで | 休業画面に表示するテキスト。 |
idleResetSeconds | 整数 | 0, または 10–3600 | タッチ(またはキー入力)がないままこの秒数が経つと、キオスクは最初のページに戻ります。0 = オフ。既定値はオフ。 |
idleResetClearData | ブール値 | true / false | リセット時に、CookieとWebサイトのデータも消去します。既定値は 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")も受け付けます。無効な値は無視されて報告され、アプリが壊れることはありません。
- settingsPIN はプロファイル内に平文で入ります(MDMの管理者には見えます)。アプリはデバイスに保存しません。
- MDMで行った変更は、アプリを開いている間に適用されます。新しいアドレスにするとページが再読み込みされます。
- アプリは com.apple.feedback.managed に状態を報告します(バージョン、アドレス、ページの読み込み、カメラと位置情報の許可状況、設定の問題)。
- Kioskysは、フォアグラウンドにある間はiPadをスリープさせません。アプリから出られないようにするには、シングルAppモードを使ってください。
- 画面の左上を素早く5回タップすると、設定が再び開きます(allowUserConfiguration が false の場合は読み取り専用。settingsPIN がある場合は先に求められます)。
- 同じキーはMDMなしでも使えます。QR設定ツールのページがキーをQRコードに変換し、設定を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>