跳过内容

iOS 设置

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

Ionic的Intune文档目前指出,使用Xcode 26构建的应用程序必须使用Intune iOS SDK 21.1.0+ 从2026年1月19日开始。这款插件已经位于该较新的SDK线上。

1. 在Info.plist中添加Intune和MSAL设置 Info.plist

标题:1. 在Info.plist中添加Intune和MSAL设置

添加一个 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. 在AppDelegate中转发MSAL回调 AppDelegate

标题:2. 在AppDelegate中转发MSAL回调
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 或更高版本。