Kioskys

MDMドキュメント

Kioskysは管理対象Appの設定(Managed App Configuration)に対応しています。MDMがキーの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 は「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 / 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>