Skip to content
No description or website provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Classes
ManagedAppConfigLib.xcodeproj
ManagedAppConfigLib
ManagedAppConfigLibTests
.gitattributes
.gitignore
LICENSE
ManagedAppConfigLib.podspec
README.md

README.md

ManagedAppConfigLib

Overview

The purpose of ManagedAppConfigLib is to make it that much easier to work with Apple's Managed App Configuration by providing a few convenience methods.

Installation

ManagedAppConfigLib can be installed via Cocoapods by adding pod 'ManagedAppConfigLib' to your Podfile under your desired targets.

Usage

You will need to import ManagedAppConfigLib in each file you wish to use it.

  • Retrieve a value set by MDM from the Managed App Configuration:
if let deviceId = ManagedAppConfig.shared.getConfigValue(forKey: "deviceId") as? String {
    print(deviceId)
}
  • Register a closure to be executed when the managed app configuration dictionary is changed:
let myClosure = { (configDict: [String : Any?]) -> Void in
    print("mannaged app configuration changed")
}
ManagedAppConfig.shared.addAppConfigChangedHook(myClosure)
  • Place a value into the managed app feedback dictionary:
let exampleKey = "errorCount"
let exampleValue = 0
ManagedAppConfig.shared.updateValue(exampleValue, forKey: exampleKey)
You can’t perform that action at this time.