Welcome to Wyler — A light library written in Swift that makes easy the process of Screen Recording for IOS. You can record your app video screen, access to the recorded video, and save it to the Photo Library.
Features
- App Screen Recording
- Set Video Size
- Access to the Video
- Save the video to the Photo Library
Requirements
- iOS 11.0+
- Xcode 11.0+
Installation
Since Codextended is implemented within a single file, the easiest way to use it is to simply drag and drop it into your Xcode project. If anyways you want to use a dependency manager:
CocoaPods
You can use CocoaPods to install Wyler
by adding it to your Podfile
:
platform :ios, '11.0'
use_frameworks!
pod 'Wyler'
To get the full benefits import Wyler
wherever you use it
import Wyler
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your Cartfile
:
github "toupper/Wyler"
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler. It is in early development, but Alamofire does support its use on supported platforms.
Once you have your Swift package set up, adding Wyler as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/toupper/Wyler.git", .upToNextMajor(from: "0.1.2"))
]
Manually
You can also integrate Wyler into your project manually.
Embedded Framework
-
Open up Terminal,
cd
into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:$ git init
-
Add Wyler as a git submodule by running the following command:
$ git submodule add https://github.com/toupper/Wyler.git
-
Open the new
Wyler
folder, and drag theWyler.xcodeproj
into the Project Navigator of your application's Xcode project. -
And that's it!
Usage example
Recording
Import Wyler in the file you are going to use it. Create an instance of ScreenRecorder
, and call it to start recording whenever you want:
import Wyler
screenRecorder.startRecording(saveToCameraRoll: true, errorHandler: { error in
debugPrint("Error when recording \(error)")
})
If you want to access the video or set a different size than the App screen, you can pass these parameters:
import Wyler
screenRecorder.startRecording(to: yourInternalURL,
size: yourSize,
saveToCameraRoll: true,
errorHandler: { error in
debugPrint("Error when recording \(error)")
})
When you want to stop recording, you just have to call the recorder with stop recording:
import Wyler
screenRecorder.stoprecording(errorHandler: { error in
debugPrint("Error when stop recording \(error)")
})
If you want to save the video to the camera, do not forget to add the Privacy - Photo Library Usage Description to the Info.plist
Contribute
We would love you for the contribution to Wyler, check the LICENSE
file for more info.
Credits
Created and maintained with love by César Vargas Casaseca. You can follow me on Medium @toupper for project updates, releases and more stories.
License
Wyler is released under the MIT license. See LICENSE for details.