ios - 从 cordova 读取 Microsoft Intune 应用程序配置属性

标签 ios cordova nsuserdefaults mdm intune

可以使用 Microsoft Intune 应用配置策略将应用配置属性部署到 iOS 应用。这些属性以 plist 格式配置并按照文档中的说明进行部署 https://github.com/MicrosoftDocs/IntuneDocs/blob/master/intune/app-configuration-policies-use-ios.md

Intune iOS SDK 似乎可以将此属性读取为“MDM 应用程序配置”,如下所述: https://learn.microsoft.com/en-us/intune/app-sdk-ios#enable-targeted-configuration-appmam-app-config-for-your-ios-applications (我无法尝试这个)

Intune 如何部署这些 plist 设置?它会在应用程序私有(private)目录中创建一个 plist 文件吗?如果是,这个文件是如何调用的?

如果没有,我如何在没有 Intune SDK 的情况下从 Cordova 访问此属性?我无法在 SDK 源代码中找到有关如何存储/接收它们的任何提示。

最佳答案

NSUserDefaults 是正确的存储,通过使用 cordova-plugin-emm-app-config 插件,我发现来自 MDM 服务器的值存储在 com.apple 中。 configuration.managed NSUserDefaults 中的字典键。

因此,像这样读取 MDM 应用程序配置对 Intune 来说效果很好:

NSDictionary *appConfig = [[NSUserDefaults standardUserDefaults] dictionaryForKey:kConfigurationKey];

关于ios - 从 cordova 读取 Microsoft Intune 应用程序配置属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52261939/

相关文章:

iphone - 我可以重用 UIView 吗?

cordova - 适用于PhoneGap的工作QR码扫描仪

javascript - Google Maps API 中的高 DPI map ?

javascript - '$root' 上的未捕获引用

objective-c - 用户更新时 NSUserDefaults 是否重置

ios - 通过 NSDictionary 将 NSUserDefaults standardUserDefaults 放入 TableView

ios - Codename One 中使用 native code 时参数可以随意命名吗?

ios - 在 ios 中为 launchscreen.xib 设置背景图片

iphone - 我得到了一个 EXC_BAD_ACCESS,我似乎无法找出原因

ios - 将保存的关键数据加载到UITableView