---
title: "daemon(plistName:)"
framework: servicemanagement
role: symbol
role_heading: Type Method
path: "servicemanagement/smappservice/daemon(plistname:)"
---

# daemon(plistName:)

Initializes an app service object with a launch daemon with the property list name you provide.

## Declaration

```swift
class func daemon(plistName: String) -> Self
```

## Parameters

- `plistName`: The name of the property list corresponding to the doc://com.apple.servicemanagement/documentation/ServiceManagement/SMAppService.

## Return Value

Return Value An SMService object

## Discussion

Discussion The property list name must correspond to a property list in the calling app’s Contents/Library/LaunchDaemons directory

## See Also

### Managing apps

- [mainApp](servicemanagement/smappservice/mainapp.md)
- [agent(plistName:)](servicemanagement/smappservice/agent(plistname:).md)
- [loginItem(identifier:)](servicemanagement/smappservice/loginitem(identifier:).md)
