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.
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.
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
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"
Is this user default property "LDMGlobalEnabled" to detect lockdown mode has been documented in apple developer documentation as iOS 16 is being released ?
AFAIK nothing has changed in this space since my previous post. If someone had filed a bug and posted the number, I could check on its state, but no one has )-:
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Stumbled upon this today. Thank you, Quinn; happy to file a suggestion for this API: FB13152209.
@eskimo any update on the bug ? any API available to know whether Lockdown Mode enabled or not in device ?