Wyler is a lightweight Swift library that simplifies screen recording on iOS. You can record your app screen, access the recorded video file, and optionally save it to the Photo Library.
- App screen recording with ReplayKit
- Optional microphone and app audio capture
- Configurable output URL and video size
- Optional save to the Photo Library
- CocoaPods, Carthage, Swift Package Manager, or manual integration
- iOS 11.0+
- Swift 5.9+
Since Wyler is implemented in a single source file, the simplest setup is to drag ScreenRecorder.swift into your Xcode project. If you prefer a package manager:
Add Wyler to your package dependencies:
.package(url: "https://github.com/toupper/Wyler.git", from: "1.0.1")platform :ios, '11.0'
use_frameworks!
target 'MyApp' do
pod 'Wyler', '~> 1.0'
endgithub "toupper/Wyler" ~> 1.0
Import Wyler where you want to start recording:
import Wyler
let screenRecorder = ScreenRecorder()Start a recording with the default output URL:
screenRecorder.startRecording(saveToCameraRoll: true) { error in
debugPrint("Error when recording: \(error)")
}Customize the output URL, size, and audio capture:
screenRecorder.startRecording(
to: yourInternalURL,
size: yourSize,
saveToCameraRoll: true,
recordAudio: shouldRecordAudio
) { error in
debugPrint("Error when recording: \(error)")
}Stop recording:
screenRecorder.stopRecording { error in
debugPrint("Error when stopping recording: \(String(describing: error))")
}If you save to the Photo Library, add NSPhotoLibraryAddUsageDescription to your app's Info.plist.
- Wyler uses
ReplayKit, so recording availability depends on Apple platform restrictions. - Saving to the Photo Library is skipped unless
saveToCameraRollistrue.
Wyler is released under the MIT license. See LICENSE for details.
