https://github.com/silkodenis/swift-combine-camera
A Swift package for integrating video capturing in iOS applications, built using Combine and AVFoundation in a declarative style.
https://github.com/silkodenis/swift-combine-camera
avfoundation camera camera-access combine declarative ios swift-package video video-capture
Last synced: about 2 months ago
JSON representation
A Swift package for integrating video capturing in iOS applications, built using Combine and AVFoundation in a declarative style.
- Host: GitHub
- URL: https://github.com/silkodenis/swift-combine-camera
- Owner: silkodenis
- License: apache-2.0
- Created: 2024-05-23T22:14:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-02T20:02:07.000Z (about 1 year ago)
- Last Synced: 2025-06-03T09:44:33.143Z (about 1 year ago)
- Topics: avfoundation, camera, camera-access, combine, declarative, ios, swift-package, video, video-capture
- Language: Swift
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/silkodenis/swift-combine-camera/blob/main/LICENSE)

# Combine Camera
Combine Camera is a Swift package for integrating video capturing in iOS applications, built using Combine and AVFoundation in a declarative style, well-suited for UDF (Unidirectional Data Flow) architectures.
## Features
- Declarative programming style with Combine
- Simple and intuitive video capturing setup
- Support for switching cameras
- Requesting camera access and managing access status
- Real-time pixel buffer processing
### Requirements
- **iOS 14**+
- **Xcode 12**+
- **Swift 5.3**+
### Using Swift Package Manager from Xcode
To add CombineCamera to your project in Xcode:
1. Open your project in Xcode.
2. Navigate to `File` → `Swift Packages` → `Add Package Dependency...`.
3. Paste the repository URL: `https://github.com/silkodenis/swift-combine-camera.git`.
4. Choose the version you want to use (you can specify a version, a commit, or a branch).
5. Click `Next` and Xcode will download the package and add it to your project.
### Using Swift Package Manager from the Command Line
If you are managing your Swift packages manually or through a package.swift file, add CombineCamera as a dependency:
1. Open your `Package.swift`.
2. Add `CombineCamera` to your package's dependencies:
```swift
let package = Package(
name: "YourProjectName",
dependencies: [
.package(url: "https://github.com/silkodenis/swift-combine-camera.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
.target(
name: "YourTargetName",
dependencies: ["CombineCamera"]
)
]
)
```
This setup specifies that CombineCamera should be pulled from the master branch and included in the YourTargetName target of your project.
## Demo Application
To see a working example of how to use the CombineCamera package, check out the CombineCamera [Demo App](https://github.com/silkodenis/combine-camera-demo-app) repository. This demo application demonstrates how to integrate CombineCamera in an iOS project with a UDF (Unidirectional Data Flow) architecture using Combine.
## Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
## License
This project is licensed under the [Apache License, Version 2.0](LICENSE).