https://github.com/noppefoxwolf/holo
Dummy camera works on simurator without changes.
https://github.com/noppefoxwolf/holo
avfoundation ios mocking-framework
Last synced: 12 months ago
JSON representation
Dummy camera works on simurator without changes.
- Host: GitHub
- URL: https://github.com/noppefoxwolf/holo
- Owner: noppefoxwolf
- License: mit
- Created: 2019-07-17T10:26:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-27T13:23:08.000Z (over 6 years ago)
- Last Synced: 2024-05-02T05:46:01.894Z (almost 2 years ago)
- Topics: avfoundation, ios, mocking-framework
- Language: Swift
- Homepage:
- Size: 12.2 MB
- Stars: 55
- Watchers: 1
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## Usage
It's easy to use.
Add these lines to your project code.
These works for replacing the implementation at the time of simulator execution.
```swift
#if targetEnvironment(simulator)
import Holo
public typealias AVCaptureDevice = AnyCaptureDevice
public typealias AVCaptureDeviceInput = AnyCaptureDeviceInput
public typealias AVCaptureSession = AnyCaptureSessionContainer
public typealias AVCaptureVideoDataOutput = AnyCaptureVideoDataOutput
public typealias AVCaptureConnection = AnyCaptureConnection
public typealias AVCaptureVideoDataOutputSampleBufferDelegate = AnyCaptureVideoDataOutputSampleBufferDelegate
public typealias AVCaptureOutput = AnyCaptureOutput
public typealias AVCaptureInput = AnyCaptureInput
public typealias AVDiscoverySession = AVCaptureDevice.AnyDiscoverySession
#endif
```
You can decide dummy camera contents.
```swift
#if targetEnvironment(simulator)
HoloSettings.shared.mode = .video(Bundle.main.url(forResource: "video", withExtension: "mp4")!)
#endif
```
## Screenshots
**Before**

**After**

## Requirements
## Installation
Holo is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'Holo', git: 'git@github.com:noppefoxwolf/Holo.git', branch: 'master'
```
## Author
noppefoxwolf, noppelabs@gmail.com
## License
Holo is available under the MIT license. See the LICENSE file for more info.
## Thanks
Example files from [File Example](https://file-examples.com/index.php).