跳过内容

iOS 配置

GitHub

最低 iOS 版本:

推荐 Xcode 行:
  • Ionic 的 Intune 文档目前指出,使用 Xcode 26 构建的应用程序必须使用 Intune iOS SDK,从 2026 年 1 月 19 日开始。这款插件已经切换到较新的 SDK 行。 21.5.1
  • 1. 将 Intune 和 MSAL 设置添加到 Info.plist 中 17.0
  • 标题:1. 将 Intune 和 MSAL 设置添加到 Info.plist 中 26.x

Ionic’s Intune docs currently note that apps built with Xcode 26 must use Intune iOS SDK 21.1.0+ starting on January 19, 2026. This plugin is already on that newer SDK line.

包括安装、同步和源 Markdown 指南。 Info.plist

iOS 支持矩阵

添加一个 IntuneMAMSettings 字典:

<key>IntuneMAMSettings</key>
<dict>
<key>ADALClientId</key>
<string>YOUR_CLIENT_ID</string>
<key>ADALRedirectUri</key>
<string>msauth.com.example.app://auth</string>
<key>ADALAuthority</key>
<string>https://login.microsoftonline.com/common</string>
</dict>

插件读取:

  • ADALClientId
  • ADALRedirectUri
  • ADALRedirectScheme 如果您更喜欢只存储方案作为fallback
  • ADALAuthority 作为可选的权威覆盖

2. 将MSAL回调转发到AppDelegate AppDelegate

标题:2. 将MSAL回调转发到AppDelegate
import MSAL
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
) -> Bool {
return MSALPublicClientApplication.handleMSALResponse(
url,
sourceApplication: options[.sourceApplication] as? String
)
}

3. 配置URL方案和权限

标题:3. 配置URL方案和权限

遵循Microsoft和Ionic的Intune指南:

  • the msauth... 重定向 URI 方案
  • 钥匙串共享 / 钥匙串访问组
  • LSApplicationQueriesSchemes
  • NSFaceIDUsageDescription 如果您的流程需要生物识别

这些是应用程序特有的,无法由插件推断。

4. 运行 IntuneMAMConfigurator

标题为“4. 运行 IntuneMAMConfigurator”

微软要求运行 IntuneMAMConfigurator 并且对您的最终应用程序 Info.plist 和权限。使用官方 Intune iOS SDK 的最新配置器,并在这些文件材料发生变化时重新运行它。

因为当前的SDK iOS Intune iOS 包含在当前 21.x 您的应用目标应保持在 iOS 或更高版本 17.0 继续从 iOS 设置

标题:继续从 iOS 设置

如果您正在使用

iOS 设置 来规划原生插件工作,连接它到 使用@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intune 为原生能力在使用@capgo/capacitor-intune, for the native capability in Using @capgo/capacitor-intune, 为产品工作流程在Capgo插件目录, for the product workflow in Capgo Plugin Directory, Capacitor Capgo Capacitor Capgo 添加或更新插件 __CAPGO_KEEP_0__ 添加或更新插件, 和 Ionic 企业插件替代品 __CAPGO_KEEP_0__ Ionic 企业插件替代品.