User + Screen Recording iOS SDK
The SDK uses a private function UIGetScreenImage to record the screen. It is potentially unsafe and you should only use this for testing or generating videos. Although this private function call is obfuscated, you shouldn't submit apps to the store with this framework included.
CocoaPods is the recommended way to add CaptureRecord to your project.
Create a Podfile
.
platform :ios, '5.0' pod 'CaptureRecord', '~> 0.2.4'
Note the specification of iOS 5.0 as the platform; leaving out the 5.0 will cause CocoaPods to fail with the following message:
[!] CaptureRecord (0.2.4) is not compatible with iOS 4.3.
Open the workspace (not the xcodeproj).
#import <CaptureRecord/CaptureRecord.h>Specify
CRUIWindow
as the UIWindow
class:
self.window = [[CRUIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
This allows the framework to record touch events.
If your window is defined in interface builder, you'll need to change the window to use a Custom Class CRUIWindow
Follow these steps in order to use the Capture Record iOS SDK within your own Xcode project as a statically linked framework.
CaptureRecord.framework
into your project’s Frameworks section, adding it to your target.Link Binary With Libraries
build phase:
AssetsLibrary.framework
AVFoundation.framework
CoreMedia.framework
CoreVideo.framework
#import <CaptureRecord/CaptureRecord.h>Specify
CRUIWindow
as the UIWindow
class:
self.window = [[CRUIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
This allows the framework to record touch events.
If your window is defined in interface builder, you'll need to change the window to use a Custom Class CRUIWindow
The project source is available on github, at gabriel/CaptureRecord, under a GPL license. A commercial license is available at CocoaControls.
If you have a support issue, submit feedback or bug requests to GitHub Issues
The SDK generates a video, saved to your camera roll. Here is a sample video.
This video was modified to run in browser. The original is here.
After installing, you can activate the Start Recording screen by tapping on the screen with two fingers three times. You'll want to tap on a part of the screen which doesn't handle touches such as the navigation bar.
To stop and save the recording, use the same gesture, tap on the screen with two fingers three times.
Now you can choose to Save or Discard the video. If you choose Save, the recording is saved to your Camera Roll in the Photos app.
If using an iPhone 5, make sure your app supports full screen height (with Default-568h.png).
The SDK is compatible with iOS 5 and above, and runs best on most recent devices (iPhone 4S or later).
You can start, stop, save and configure recordings manually. More details are available in the API documentation.
You can set the album name for where videos are saved in the Photos app.
[[CRRecorder sharedRecorder] setAlbumName:@"Capture Record 2012-09-08"];
You can configure basic recording options. The default is to record the user, audio and touches.
[[CRRecorder sharedRecorder] setOptions:CRRecorderOptionUserCameraRecording | CRRecorderOptionUserAudioRecording | CRRecorderOptionTouchRecording];