Ivanti Web@Work
Ivanti Web@Work 是 Ivanti 的安全移动浏览器。Protocol Launcher 允许你生成 Web@Work URL scheme 链接。
使用
有两种方式使用此库:
- On-Demand 从子路径导入,有利于 tree-shaking 并保持包体积较小。
- Full Import 从根包导入,写起来更方便,但会包含所有应用模块。
生产构建建议使用 On-Demand;快速脚本或演示可以使用 Full Import。
选择安装方式
按需加载
推荐使用。生产环境优化。
全量导入
使用便捷。适合快速脚本。
说明
Ivanti 的 Web@Work for iOS 官方指南记录了四个 scheme:mibrowser:// 用于 HTTP 连接,mibrowsers:// 用于 HTTPS 连接,mibrowserf:// 用于使用 HTTP 的全屏 web clip,mibrowsersf:// 用于使用 HTTPS 的全屏 web clip。
本模块只替换与所选连接类型匹配的标准 URL 前缀,不添加参数,也不暴露未在官方文档中记录的 Web@Work 动作。
打开 HTTP URL
ts
import { openHttpUrl } from 'protocol-launcher/ivanti-web-work'
const url = openHttpUrl({
url: 'http://www.example.com/intranet',
})打开 HTTPS URL
ts
import { openHttpsUrl } from 'protocol-launcher/ivanti-web-work'
const url = openHttpsUrl({
url: 'https://www.example.com/secure',
})打开全屏 HTTP URL
ts
import { openFullScreenHttpUrl } from 'protocol-launcher/ivanti-web-work'
const url = openFullScreenHttpUrl({
url: 'http://www.example.com/app',
})打开全屏 HTTPS URL
ts
import { openFullScreenHttpsUrl } from 'protocol-launcher/ivanti-web-work'
const url = openFullScreenHttpsUrl({
url: 'https://www.example.com/app',
})生成的 URL
ts
openHttpUrl({
url: 'http://www.example.com/intranet',
})
// => 'mibrowser://www.example.com/intranet'
openHttpsUrl({
url: 'https://www.example.com/secure',
})
// => 'mibrowsers://www.example.com/secure'
openFullScreenHttpUrl({
url: 'http://www.example.com/app',
})
// => 'mibrowserf://www.example.com/app'
openFullScreenHttpsUrl({
url: 'https://www.example.com/app',
})
// => 'mibrowsersf://www.example.com/app'