Swiftpack.co - sindresorhus/is-camera-on as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by sindresorhus.
sindresorhus/is-camera-on v2.0.2
Check if the built-in Mac camera is on
⭐️ 115
🕓 1 week ago
macOS
.package(url: "https://github.com/sindresorhus/is-camera-on.git", from: "v2.0.2")

is-camera-on

Check if the built-in Mac camera is on

The camera is commonly known as FaceTime HD or iSight.

This module can be useful to check if the camera is already in use or notify you if it's turned on when you didn't intend it to be.

Requirements

  • macOS 10.11+
  • Xcode 13+
  • Swift 5.5+

Install

Add the following to Package.swift:

.package(url: "https://github.com/sindresorhus/is-camera-on", from: "2.0.2")

Or add the package in Xcode.

Usage

import IsCameraOn

print(isCameraOn())
//=> true

Related

GitHub

link
Stars: 115
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1 week ago
  • Upgrade to Swift 5.5

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics