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.
- 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
- iOS 14+
- Xcode 12+
- Swift 5.3+
To add CombineCamera to your project in Xcode:
- Open your project in Xcode.
- Navigate to
File
→Swift Packages
→Add Package Dependency...
. - Paste the repository URL:
https://github.com/silkodenis/swift-combine-camera.git
. - Choose the version you want to use (you can specify a version, a commit, or a branch).
- Click
Next
and Xcode will download the package and add it to your project.
If you are managing your Swift packages manually or through a package.swift file, add CombineCamera as a dependency:
- Open your
Package.swift
. - Add
CombineCamera
to your package's dependencies:
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.
To see a working example of how to use the CombineCamera package, check out the CombineCamera Demo App repository. This demo application demonstrates how to integrate CombineCamera in an iOS project with a UDF (Unidirectional Data Flow) architecture using Combine.
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the Apache License, Version 2.0.