Monday, December 18, 2023
HomeiOS Developmentios - Utilizing Jamf to safety write new configuration to managed utility

ios – Utilizing Jamf to safety write new configuration to managed utility


I’ve realized that it is attainable to inject new configuration to MDM managed utility utilizing MDM in order that the managed app configuration adjustments which might be pushed down from an MDM server seem in NSUSerDefaults.

Then I can add an observer to be notified of any adjustments happens in NSUserDefaults.

The app configuration will probably be saved within the following key:com.apple.configuration.managed
A utilization instance will be seem like this :

if let managedConf = UserDefaults.normal.object(forKey: "com.apple.configuration.managed") as? [String:Any?] {
    if let serverURL = managedConf["serverURL"] as? String{
        return serverURL
    }
}

Nevertheless, what forestall one other entity from modifying the configuration outdoors the MDM… as I perceive NSUserDefaults are writable even from terminal so there isn’t any limitation to only push new configuration that are unauthorized.

an instance of adjusting configuration will be:

managedConf["serverURL"] = "BAD_SERVER_NAME"
let defaults = UserDefaults.normal
defaults.set(managedConf, forKey: "com.apple.configuration.managed")

Maybe it is solely attainable for writing the applying’s userDefault from throughout the utility ?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments