Platforms to show: All Mac Windows Linux Cross-Platform

Back to IOPMAssertionMBS class.

IOPMAssertionMBS.Details as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The details for this assertion.

You may provide extra, contextual information about an assertion for admins and for debugging in this key. Setting this key in an assertion dictionary is optional.

Please name your assertion something unique with kIOPMAssertionNameKey first.
If you have more data to describe this assertion, put it here as a String.

Example: OS X creates an assertion named com.apple.powermanagement.tty to prevent sleep for remote-logged in users. To identify the cause for these assertions, OS X sets kIOPMAssertionDetailsKey to the String device path of the active remote session(s), e.g. "/dev/ttys000" or "/dev/ttys004"

The String you associate with this key does not have to be localizable (OS X will not attempt to localize it.)
(Read and Write property)

IOPMAssertionMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The internal handle to the assertion.

Zero is not a valid ID.
(Read only property)

IOPMAssertionMBS.HumanReadableReason as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Optional valie that provides a localizable string for OS X to display PM Assertions in the GUI.

The caller should specify this string in CreateWithProperties.
If present, OS X may display this string, localized to the user's language, to explain changes in system behavior caused by the assertion.

If set, the caller must also specify a bundle path for the key kIOPMAssertionLocalizationBundlePathKey.
The bundle at that path should contain localization info for the specified string.
(Read and Write property)

IOPMAssertionMBS.Level as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The assertion level.

(Read and Write property)

IOPMAssertionMBS.LocalizationBundlePath as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Refers to a string, identifying the path to the caller's bundle, which contains localization info.

(Read and Write property)

IOPMAssertionMBS.Name as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The name of the assertion.
Example
dim t as string = IOPMAssertionMBS.kIOPMAssertionTypePreventUserIdleDisplaySleep
dim l as Integer = IOPMAssertionMBS.kIOPMAssertionLevelOn
dim a as IOPMAssertionMBS = IOPMAssertionMBS.CreateWithName(t, l, "Working")
MsgBox a.Name

kIOPMAssertionNameKey describes the the activity the assertion is protecting. The creator should specify a String value for this key in the dictionary passed to CreateWithProperties.

The assertion name is separate from the assertion type's behavior - specify a String like "Checking mail" or "Compiling" that describes the task that this assertion protects.

The String you associate with this key does not have to be localizable (OS X will not attempt to localize it.)
(Read and Write property)

IOPMAssertionMBS.RetainCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The retain count of the object.

(Read only property)

IOPMAssertionMBS.Timeout as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Specifies an outer bound, in seconds, that this assertion should be asserted.

If your application hangs, or is unable to complete its assertion task in a reasonable amount of time, specifying a timeout allows PM to disable your assertion so the system can resume normal activity.
Once a timeout with the kIOPMAssertionTimeoutActionTurnOff assertion fires, the level will be set to kIOPMAssertionTimeoutActionTurnOff. The assertion may be re-armed by calling IOPMAssertionSetLevel.
(Read and Write property)

IOPMAssertionMBS.TimeoutAction as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Specifies the action to take upon timeout expiration.

Specifying the timeout action only has meaning if you also specify an kIOPMAssertionTimeoutKey.
If the caller does not specify a timeout action, the default action is kIOPMAssertionTimeoutActionTurnOff.
(Read and Write property)

IOPMAssertionMBS.Type as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Power MBS MacOSX Plugin 13.2 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The assertion type.

The value for this key will be a CFStringRef, with the value of the assertion type specified at creation time.
Note that OS X may substitute a support assertion type string if the caller specifies a deprecated assertion type; in that case the value for this key could differ from the caller-provided assertion type.
(Read and Write property)

The items on this page are in the following plugins: MBS MacOSX Plugin.


The biggest plugin in space...