Latest 1.0.1
License MIT
Platforms ios 7.0
Dependencies SGVObjcMixin
Frameworks UIKit

SGASScreenRecorder :movie_camera:

CI Status

Unfortunately, this no longer works when running on iOS 9.x. The behavior of IOMobileFramebufferGetLayerDefaultSurface() function has changed and it seems that there is no longer a way to access the screen’s surface to capture video samples from. More details can be found in StackOverflow answer by @jvisenti here:

Super-efficient, highly convenient, and easily configurable screen recording for iOS apps.

Warning: This is only meant to be used during development in debug and in-house testing builds and is completely NOT App Store-safe.


It allows you to continuously record whatever is happening on the device’s screen while your application is in foreground and save this recording either to a video file or to device’s Photo Library.


Screen capture is done using low-level functions from the IOKit, IOSurface and IOMobileFramebuffer private frameworks. This mostly boils down to IOMobileFramebufferGetLayerDefaultSurface() and IOSurfaceAcceleratorTransferSurface() calls.

Capturing is done from a callback of a CADisplayLink scheduled on a background thread’s runloop to minimize performance impact on application code. There’s no busy waiting and no operations are performed on the main thread during capture.


  • Because recording in-app activities has never been simpler
  • Because a video is worth a thousand words of any bug report

What’s Inside

  • Screen recorder
  • Photo library import for recorded videos
  • Screen corner overlay UI for convenient integration
  • On-screen touch visualization during screen recording


Use CocoaPods to quickly run the example project:

pod try SGASScreenRecorder


  • iOS 7.0.0 and above
  • iOS devices only. Will build for and run on iOS Simulator, but will not do any actual recording


SGASScreenRecorder is available through CocoaPods.


For a simple all-in-one installation, add the following line to your Podfile:

pod 'SGASScreenRecorder', '~> 1.0'

To initialize the screen recording UI overlay, run something along the following lines:

- (void)setupScreenRecorderUIManager {
#ifndef APPSTORE
    SGASScreenRecorderSettings *settings = [SGASScreenRecorderSettings new];
    _screenRecorderUIManager = [[SGASScreenRecorderUIManager alloc] initWithScreenCorner:UIRectCornerTopLeft

Make sure to use compile-time checks/preprocessor macros to prevent this code from getting to App Store builds.

Feel free to peek into the demo project for more details.


If you do not need the recording overlay UI and would rather prefer to start and stop recording yourself, you could only import what you need:

  • Use pod 'SGASScreenRecorder/SGASScreenRecorder', '~> 1.0' to get just the screen recorder


  • Use pod 'SGASScreenRecorder/SGASPhotoLibraryScreenRecorder', '~> 1.0' to get the screen recorder plus Photo Library import support


@Shmatlay, @sanekgusev

This project was initially based on the early versions of RecordMyScreen project and was privately developed by @Shmatlay, who added screen overlay controls, touch visualization, and saving to the Photo Library. With Andrey’s permission, I later refactored the project, transitioned it to ARC, made it more modular, and completely rewrote the capturing code to support iOS8, improve performance and memory footprint.

I can be bugged via the following:


SGASScreenRecorder is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "SGASScreenRecorder",
    "version": "1.0.1",
    "summary": "Efficient on-device screen recording for iOS apps.",
    "cocoapods_version": ">= 1.0.0.beta2",
    "description": "Record whatever is happening on your device's screen while your app is in foreground.nnFeatures:nn* low performance impactn* low memory footprintn* save recordings to a video file or import into Photo Libraryn* touch visualization during recordingn* simple overlay UI to start/stop recordingnn             To be only used in development and in-house builds, *not* App Store-safe at all.",
    "homepage": "",
    "screenshots": "",
    "license": "MIT",
    "authors": {
        "Alexander Gusev": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "social_media_url": "",
    "platforms": {
        "ios": "7.0"
    "source_files": [
    "public_header_files": "Pod/Classes/SGASScreenRecorderUIManager.h",
    "frameworks": "UIKit",
    "dependencies": {
        "SGVObjcMixin": [
            "~> 1.0"
    "pod_target_xcconfig": {
        "GCC_WARN_SHADOW": "YES",
        "GCC_WARN_64_TO_32_BIT_CONVERSION": "YES",
    "subspecs": [
            "name": "SGASScreenRecorder",
            "source_files": [
            "public_header_files": [
            "dependencies": {
                "SGVBackgroundRunloop": [
                    "~> 1.0"
            "frameworks": [
            "subspecs": [
                    "name": "SGASScreenRecorderPrivate",
                    "source_files": "Pod/PrivateHeaders/**/*.h",
                    "private_header_files": "Pod/PrivateHeaders/**/*.h",
                    "header_mappings_dir": "Pod/PrivateHeaders",
                    "preserve_paths": "Pod/PrivateFrameworks/**/*.framework",
                    "weak_frameworks": [
                    "user_target_xcconfig": {
                        "FRAMEWORK_SEARCH_PATHS": ""${PODS_ROOT}/SGASScreenRecorder/Pod/PrivateFrameworks/8.4""
            "name": "SGASPhotoLibraryScreenRecorder",
            "source_files": "Pod/Classes/SGASPhotoLibraryScreenRecorder.{h,m}",
            "frameworks": "AssetsLibrary",
            "dependencies": {
                "SGASScreenRecorder/SGASScreenRecorder": []

Pin It on Pinterest

Share This