AppServiceSharp 1.0.1

dotnet add package AppServiceSharp --version 1.0.1
                    
NuGet\Install-Package AppServiceSharp -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AppServiceSharp" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AppServiceSharp" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="AppServiceSharp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AppServiceSharp --version 1.0.1
                    
#r "nuget: AppServiceSharp, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AppServiceSharp@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AppServiceSharp&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=AppServiceSharp&version=1.0.1
                    
Install as a Cake Tool

AppServiceSharp

macOS SMAppService bindings for .NET

Overview

This library provides bindings for the SMAppService framework on macOS 13 and later, covering the ability to manage Login Items, Launch Agents and Launch Daemons.

Do I need this?

If you are developing a macOS application that needs to launch at login or requires a background service to be run, this library may be useful to you.

It's recommended to check out Apple's documentation on Service Management and XPC to decide if this library is suitable for your needs.

Usage

Legacy methods (such as SMJobBless) are not included in this project.

The library consists of a single class, AppService, which provides most the methods found in the SMAppService Objective-C API.

Static properties and methods in the class can be used to create instances of AppService:

  • AppService.MainAppService
  • AppService.AgentServiceWithPlistName(string plistName)
  • AppService.DaemonServiceWithPlistName(string plistName)
  • AppService.LoginItemServiceWithIdentifier(string bundleIdentifier)

Additional methods and properties are available for convenience:

  • AppService.IsSupported - returns whether the current macOS version supports the SMAppService framework.
  • AppService.OpenSystemSettingsLoginItems() - opens System Settings to the Login Items section.

Note compatibility checks are performed at runtime, resulting in a PlatformNotSupportedException being thrown if the current macOS version is too old.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on AppServiceSharp:

Repository Stars
dragonfruitnetwork/onionfruit
OnionFruit™ - Connect to the Tor network with minimal effort
Version Downloads Last Updated
1.0.1 281 6/13/2025