跳过内容

iOS 设置

  • Intune iOS SDK 由此插件捆绑: 21.5.1
  • 最低iOS版本: 17.0
  • 推荐Xcode行: 26.x

ionic的intune文档目前指出,使用xcode 26构建的应用程序必须从2026年1月19日开始使用intune ios SDK。 21.1.0+ 此插件已经在更新的SDK线上。

1. 将intune和msal设置添加到 Info.plist

标题:1. 将intune和msal设置添加到info.plist

添加一个 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 如果您更喜欢只存储方案
  • ADALAuthority 作为一个可选的权威

2. 将msal回调转发到 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
)
}

遵循 Microsoft 和 Ionic 的 Intune 指南:

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

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

4. 运行 IntuneMAMConfigurator

标题为“4. 运行 IntuneMAMConfigurator”

Microsoft 需要运行 IntuneMAMConfigurator 对最终应用程序 Info.plist 使用最新的配置器从官方 Intune iOS SDK 中获取,并在这些文件发生重大变化时重新运行它。

由于内置的 Intune iOS SDK 位于当前 21.x 线上,因此您的应用程序目标应保持在 iOS 17.0 或更高版本。