All Projects → YuigaWada → Icimulator

YuigaWada / Icimulator

Licence: mit
Simulate camera functions on iOS Simulator with images, videos, or your MacBook Camera.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Icimulator

Kyshutterbutton
KYShutterButton is a custom button that is similar to the shutter button of the camera app
Stars: ✭ 293 (+65.54%)
Mutual labels:  camera, cocoapods, carthage
Irldocumentscanner
A drop-in Objective-C ViewController that will Automatically scan a document for you you.
Stars: ✭ 172 (-2.82%)
Mutual labels:  camera, cocoapods, carthage
Mtbbarcodescanner
A lightweight, easy-to-use barcode scanning library for iOS 8+
Stars: ✭ 1,085 (+512.99%)
Mutual labels:  camera, cocoapods, carthage
Cameramanager
Simple Swift class to provide all the configurations you need to create custom camera view in your app
Stars: ✭ 1,130 (+538.42%)
Mutual labels:  camera, cocoapods, carthage
Heapinspector For Ios
Find memory issues & leaks in your iOS app without instruments
Stars: ✭ 1,819 (+927.68%)
Mutual labels:  cocoapods, carthage
Sdl ios
Get your app connected to the 🚙, make your users feel like a 🌟
Stars: ✭ 147 (-16.95%)
Mutual labels:  cocoapods, carthage
Underlinetextfield
Simple UITextfield Subclass with state
Stars: ✭ 156 (-11.86%)
Mutual labels:  cocoapods, carthage
Apesuperhud
A simple way to display a HUD with a message or progress information in your application.
Stars: ✭ 156 (-11.86%)
Mutual labels:  cocoapods, carthage
Cdmarkdownkit
An extensive Swift framework providing simple and customizable markdown parsing.
Stars: ✭ 158 (-10.73%)
Mutual labels:  cocoapods, carthage
Multipeer
📱📲 A wrapper for the MultipeerConnectivity framework for automatic offline data transmission between devices
Stars: ✭ 170 (-3.95%)
Mutual labels:  cocoapods, carthage
Wkcookiewebview
WKWebView with cookie sharing support
Stars: ✭ 171 (-3.39%)
Mutual labels:  cocoapods, carthage
Svprogresshud
A clean and lightweight progress HUD for your iOS and tvOS app.
Stars: ✭ 12,339 (+6871.19%)
Mutual labels:  cocoapods, carthage
Auth0.swift
Swift toolkit for Auth0 API
Stars: ✭ 146 (-17.51%)
Mutual labels:  cocoapods, carthage
Ktvhttpcache
A powerful media cache framework.
Stars: ✭ 2,113 (+1093.79%)
Mutual labels:  cocoapods, carthage
Eureka
Elegant iOS form builder in Swift
Stars: ✭ 11,345 (+6309.6%)
Mutual labels:  cocoapods, carthage
Sffocusviewlayout
UICollectionViewLayout with focused content
Stars: ✭ 1,760 (+894.35%)
Mutual labels:  cocoapods, carthage
Bluetonium
Bluetooth mapping in Swift
Stars: ✭ 159 (-10.17%)
Mutual labels:  cocoapods, carthage
Kvkcalendar
A most fully customization calendar and timeline library for iOS 📅
Stars: ✭ 160 (-9.6%)
Mutual labels:  cocoapods, carthage
Bluetoothkit
Easily communicate between iOS/OSX devices using BLE
Stars: ✭ 2,027 (+1045.2%)
Mutual labels:  cocoapods, carthage
Donut
Donut is a library for arranging views circularly like a donut.
Stars: ✭ 141 (-20.34%)
Mutual labels:  cocoapods, carthage

License Swift Version CocoaPods Compatible Carthage compatible


iOS Camera Simulator 📷

iCimulator allows us to use camera functions on iOS Simulator!

2019-Oct-23: A new mode 'Mac Camera Mode' is added!

→Click here for details!


Support for AVFoundation & UIImagePickerController !

Installation 🎈

CocoaPods

You can use CocoaPods to install iCimulator by adding it to your Podfile:

pod 'iCimulator'

Carthage

Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/iCimulator.framework to an iOS project.

github "YuigaWada/iCimulator"

Manually

  1. Download and drop iCimulator in your project.
  2. Congratulations!



Usage🍏 - Image or Video -

Just 5 steps!

  1. Prepare your mock data. (image/video)
  2. Install iCimulator.
  3. Copy iCimulator.swift and iCimulator.plist to your project.
  4. Set up iCimulator.plist , which is described what kind of mock data is used.
  5. Link iCimulator.swift and iCimulator.plist to your project.

You can copy iCimulator.swift and iCimulator.plist from template folder.






**This 5-Steps MUST BE DONE on all projects which use camera functions.**



iCimulator.plist

Key Value Notes
Type Image You can set an image as a mock
Video You can set a video as a mock
Mac-Camera Click here for details!
Argument ... Write here path of your mock data



iCimulator.swift

//
//   ** iCimulator.swift **
//


// MIT License
//
// Copyright (c) 2019 YuigaWada
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//



#if targetEnvironment(simulator)
    import iCimulator

    //AVFoundation
    public typealias AVCaptureDevice = FakeCaptureDevice
    public typealias AVCaptureSession = FakeCaptureSession
    public typealias AVCaptureVideoPreviewLayer = FakePreviewLayer
    public typealias AVCapturePhotoOutput = FakeCapturePhotoOutput
    public typealias AVCapturePhotoCaptureDelegate = FakeCapturePhotoCaptureDelegate
    public typealias AVCapturePhoto = FakeCapturePhoto
    public typealias AVCaptureDeviceInput = FakeCaptureDeviceInput
    public typealias AVCaptureMovieFileOutput = FakeCaptureMovieFileOutput
    public typealias AVCaptureFileOutput = FakeCaptureFileOutput
    public typealias AVCaptureFileOutputRecordingDelegate = FakeCaptureFileOutputRecordingDelegate
    public typealias AVCaptureConnection = FakeCaptureConnection
    public typealias AVCapturePhotoSettings = FakeCapturePhotoSettings
    public typealias AVCaptureResolvedPhotoSettings = FakeCaptureResolvedPhotoSettings


    //For supporting iOS 10.
    public typealias AVCaptureStillImageOutput = FakeCaptureStillImageOutput
    public typealias CMSampleBuffer = FakeCMSampleBuffer

    //UIImagePickerController
    public typealias UIImagePickerController = FakeImagePickerController
    public typealias UIImagePickerControllerDelegate = FakeImagePickerControllerDelegate
#endif




Usage🍎 - Mac Camera -

You can use your macbook camera to simulate camera functions!!

First, you need to launch a camera-server on your MacBook.

Open streaming_server and launch streaming_server/server.py!


After checking your iCimulator.plist, you can see that your MacBook Camera is displayed on iOS Simulator 😊

Dependencies

  • Python 3.7.3
  • Numpy
  • opencv-python
  • Pillow
  • Pandas

Options

You can use these options in using streaming_server/server.py.


___________________________________________________________________________


██╗ ██████╗██╗███╗   ███╗██╗   ██╗██╗      █████╗ ████████╗ ██████╗ ██████╗
██║██╔════╝██║████╗ ████║██║   ██║██║     ██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗
██║██║     ██║██╔████╔██║██║   ██║██║     ███████║   ██║   ██║   ██║██████╔╝
██║██║     ██║██║╚██╔╝██║██║   ██║██║     ██╔══██║   ██║   ██║   ██║██╔══██╗
██║╚██████╗██║██║ ╚═╝ ██║╚██████╔╝███████╗██║  ██║   ██║   ╚██████╔╝██║  ██║
╚═╝ ╚═════╝╚═╝╚═╝     ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝

                                                            by Yuiga Wada.
___________________________________________________________________________

-v / -verbose / --verbose : turn on Verbose Mode.

-h / -help / --help : show help.

-c / -camera / --camera : enable you to show the captured frame on another window.



Demo

CameraKit



Fusuma



Todo📒

  • [x] typealias対象のClass →互いに可換化
  • [x] Carthageの準備
  • [x] CocoaPodsの準備
  • [ ] 日本語版READMEの作成

Contribute

We would love you for the contribution to iCimulator, check the LICENSE file for more info.

Others

Yuiga Wada - WebSite Twitter - @YuigaWada

Distributed under the MIT license. See LICENSE for more information.

https://github.com/YuigaWada/iCimulator

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].