Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSRunningApplicationMBS class.
NSRunningApplicationMBS.currentApplication as NSRunningApplicationMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS MacCocoa Plugin | 9.7 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Available in Mac OS X v10.6 and later.
NSRunningApplicationMBS.runningApplications as NSRunningApplicationMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS MacCocoa Plugin | 9.7 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns an array of NSRunningApplication instances.
The order of the array is unspecified, but it is stable, meaning that the relative order of particular applications will not change across multiple calls to runningApplications. See NSRunningApplication Class Reference for more information on NSRunningApplication.
Similar to the NSRunningApplication classes's properties, this property will only change when the main run loop is run in a common mode. Instead of polling, use key-value observing to be notified of changes to this array property.
This property is thread safe, in that it may be called from background threads and the result is returned atomically.
This list is not updated in a tight loop. For receiving updates, you need to have the runloop run (e.g. check regularly in a timer).
Some examples using this method:
NSRunningApplicationMBS.runningApplicationsWithBundleIdentifier(bundleID as string) as NSRunningApplicationMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS MacCocoa Plugin | 9.7 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An array of NSRunningApplications, or an empty array if no applications match the bundle identifier.
Available in Mac OS X v10.6 and later.
Some examples using this method:
NSRunningApplicationMBS.runningApplicationWithProcessIdentifier(pid as Integer) as NSRunningApplicationMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS MacCocoa Plugin | 9.7 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
pid: The process identifier.
Returns an instance of NSRunningApplication for the specified pid, or nil if the application has no process identifier.
Applications that do not have PIDs cannot be returned from this method.
Available in Mac OS X v10.6 and later.
The items on this page are in the following plugins: MBS MacCocoa Plugin.