---
title: frontmostApplication
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsworkspace/frontmostapplication
---

# frontmostApplication

Returns the frontmost app, which is the app that receives key events.

## Declaration

```swift
var frontmostApplication: NSRunningApplication? { get }
```

## Return Value

Return Value The running app instance for the app that receives key events.

## Discussion

Discussion This value is key-value observing compliant.

## See Also

### Requesting Information

- [urlForApplication(toOpen:)](appkit/nsworkspace/urlforapplication(toopen:)-7qkzf.md)
- [urlForApplication(toOpen:)](appkit/nsworkspace/urlforapplication(toopen:)-95cvp.md)
- [urlForApplication(withBundleIdentifier:)](appkit/nsworkspace/urlforapplication(withbundleidentifier:).md)
- [urlsForApplications(toOpen:)](appkit/nsworkspace/urlsforapplications(toopen:)-ualk.md)
- [urlsForApplications(toOpen:)](appkit/nsworkspace/urlsforapplications(toopen:)-60rkm.md)
- [urlsForApplications(withBundleIdentifier:)](appkit/nsworkspace/urlsforapplications(withbundleidentifier:).md)
- [getFileSystemInfo(forPath:isRemovable:isWritable:isUnmountable:description:type:)](appkit/nsworkspace/getfilesysteminfo(forpath:isremovable:iswritable:isunmountable:description:type:).md)
- [isFilePackage(atPath:)](appkit/nsworkspace/isfilepackage(atpath:).md)
- [runningApplications](appkit/nsworkspace/runningapplications.md)
- [menuBarOwningApplication](appkit/nsworkspace/menubarowningapplication.md)
- [getInfoForFile(_:application:type:)](appkit/nsworkspace/getinfoforfile(_:application:type:).md)
