Is there any public API apple provides to detect Lockdown Mode in iOS 16?

Hi,

I was testing the lockdown mode in iOS 16 and would like to know whether we can detect the lockdown mode status using any public API that Apple provides.

I really appreciate any help you can provide.

Replies

When Lockdown mode is enabled, LDMGlobalEnabled default is set in NSGlobalDomain. You can query this with

let isLockdownModeEnabled = (UserDefaults.standard.object(forKey: "LDMGlobalEnabled") as? Bool) ?? false

Ref : https://stackoverflow.com/questions/72956425/is-there-any-public-api-to-detect-lockdown-mode-in-ios-16beta-3#

Do not use undocumented user defaults properties as API. Such properties can and do change over time.

If you have a good reason to know whether Lockdown Mode is enabled, file a enhancement requesting a proper API for this, making sure to include an explanation of what you plan to do with it.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"