A Swift framework to easily record the screen on OS X.
You can just put ScreenRecord.swift in your Project and use the public methods or Carthage/CocoaPods.
github "KrisYu/ScreenRecord"
pod "ScreenRecord"
Download this repo and check VideoCapture.
It is a video capture app imitate GifCaptrue.
let recorder = try? ScreenRecord.Recorder(destination: url, displayId: CGMainDisplayID(), cropRect: nil, audioDevice: nil )
recorder?.start()
recorder?.stop()
recorder.start()/stop()
use the startRunning()/stopRunning()
function from AVCaptureSession. You need to consider it may block the UI / take some time.