Skip to content

Commit

Permalink
Fix compatibility with Catalyst and usage in multi-platform apps
Browse files Browse the repository at this point in the history
Fixes #5
Fixes #4
  • Loading branch information
sindresorhus committed Dec 21, 2023
1 parent 0cf4b49 commit db030a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import PackageDescription
let package = Package(
name: "LaunchAtLogin",
platforms: [
.macOS(.v13)
.macOS(.v13),
.macCatalyst(.v16)
],
products: [
.library(
Expand Down
2 changes: 2 additions & 0 deletions Sources/LaunchAtLogin/LaunchAtLogin.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if os(macOS) || targetEnvironment(macCatalyst)
import SwiftUI
import ServiceManagement
import os.log
Expand Down Expand Up @@ -118,3 +119,4 @@ extension LaunchAtLogin.Toggle<Text> {
self.init("Launch at login")
}
}
#endif

0 comments on commit db030a1

Please sign in to comment.