├── .DS_Store ├── IMG_0532.PNG ├── IMG_0533.PNG ├── IMG_0535.PNG ├── CDPReplayDemo.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ ├── CDP.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── he.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcuserdata │ ├── CDP.xcuserdatad │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── CDPReplayDemo.xcscheme │ └── he.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── CDPReplayDemo.xcscheme └── project.pbxproj ├── CDPReplayDemo ├── ViewController.h ├── AppDelegate.h ├── main.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── AppDelegate.m └── ViewController.m ├── README.md ├── CDPReplayDemoTests ├── Info.plist └── CDPReplayDemoTests.m ├── CDPReplayDemoUITests ├── Info.plist └── CDPReplayDemoUITests.m └── CDPReplay ├── CDPReplay.h └── CDPReplay.m /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdpenggod/CDPReplay/HEAD/.DS_Store -------------------------------------------------------------------------------- /IMG_0532.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdpenggod/CDPReplay/HEAD/IMG_0532.PNG -------------------------------------------------------------------------------- /IMG_0533.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdpenggod/CDPReplay/HEAD/IMG_0533.PNG -------------------------------------------------------------------------------- /IMG_0535.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdpenggod/CDPReplay/HEAD/IMG_0535.PNG -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/project.xcworkspace/xcuserdata/CDP.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdpenggod/CDPReplay/HEAD/CDPReplayDemo.xcodeproj/project.xcworkspace/xcuserdata/CDP.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/project.xcworkspace/xcuserdata/he.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cdpenggod/CDPReplay/HEAD/CDPReplayDemo.xcodeproj/project.xcworkspace/xcuserdata/he.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /CDPReplayDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // CDPReplayDemo 4 | // 5 | // Created by CDP on 2017/3/20. 6 | // Copyright © 2017年 CDP. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /CDPReplayDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // CDPReplayDemo 4 | // 5 | // Created by CDP on 2017/3/20. 6 | // Copyright © 2017年 CDP. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /CDPReplayDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // CDPReplayDemo 4 | // 5 | // Created by CDP on 2017/3/20. 6 | // Copyright © 2017年 CDP. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CDPReplay屏幕录制 2 | CDPReplay use the ReplayKit framework to record your full screen,and make video save to library. 3 | 4 | ### one 5 | 6 | 7 | 8 | ### two 9 | 10 | 11 | 12 | ### three 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /CDPReplayDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /CDPReplayDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/xcuserdata/CDP.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CDPReplayDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 87BC33F61E7FB71E00C8FEDF 16 | 17 | primary 18 | 19 | 20 | 87BC340F1E7FB71F00C8FEDF 21 | 22 | primary 23 | 24 | 25 | 87BC341A1E7FB71F00C8FEDF 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/xcuserdata/he.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | CDPReplayDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 87BC33F61E7FB71E00C8FEDF 16 | 17 | primary 18 | 19 | 20 | 87BC340F1E7FB71F00C8FEDF 21 | 22 | primary 23 | 24 | 25 | 87BC341A1E7FB71F00C8FEDF 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /CDPReplayDemoTests/CDPReplayDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDPReplayDemoTests.m 3 | // CDPReplayDemoTests 4 | // 5 | // Created by CDP on 2017/3/20. 6 | // Copyright © 2017年 CDP. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CDPReplayDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CDPReplayDemoTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /CDPReplay/CDPReplay.h: -------------------------------------------------------------------------------- 1 | // 2 | // CDPReplay.h 3 | // 4 | // Created by CDP on 16/11/9. 5 | // Copyright © 2016年 CDP. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | #import 11 | 12 | @protocol CDPReplayDelegate 13 | @optional 14 | 15 | /** 16 | * 开始录制回调 17 | */ 18 | -(void)replayRecordStart; 19 | 20 | /** 21 | * 录制结束或错误回调 22 | */ 23 | -(void)replayRecordFinishWithVC:(RPPreviewViewController *)previewViewController errorInfo:(NSString *)errorInfo; 24 | 25 | /** 26 | * 保存到系统相册成功回调 27 | */ 28 | -(void)saveSuccess; 29 | 30 | 31 | @end 32 | 33 | //系统版本需要是iOS9.0及以上才支持ReplayKit框架录制 34 | @interface CDPReplay : NSObject 35 | 36 | /** 37 | * 代理 38 | */ 39 | @property (nonatomic,weak) id delegate; 40 | 41 | /** 42 | * 是否正在录制 43 | */ 44 | @property (nonatomic,assign,readonly) BOOL isRecording; 45 | 46 | /** 47 | * 单例对象 48 | */ 49 | +(instancetype)sharedReplay; 50 | 51 | /** 52 | * 开始录制 53 | */ 54 | -(void)startRecord; 55 | 56 | /** 57 | * 结束录制 58 | * isShow是否录制完后自动展示视频预览页 59 | */ 60 | -(void)stopRecordAndShowVideoPreviewController:(BOOL)isShow; 61 | 62 | 63 | 64 | 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /CDPReplayDemoUITests/CDPReplayDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDPReplayDemoUITests.m 3 | // CDPReplayDemoUITests 4 | // 5 | // Created by CDP on 2017/3/20. 6 | // Copyright © 2017年 CDP. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CDPReplayDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation CDPReplayDemoUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /CDPReplayDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /CDPReplayDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /CDPReplayDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /CDPReplayDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CDPReplayDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // CDPReplayDemo 4 | // 5 | // Created by CDP on 2017/3/20. 6 | // Copyright © 2017年 CDP. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /CDPReplayDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // CDPReplayDemo 4 | // 5 | // Created by CDP on 2017/3/20. 6 | // Copyright © 2017年 CDP. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | 12 | #import "CDPReplay.h" 13 | 14 | 15 | @interface ViewController () { 16 | UIButton *_startBt; 17 | UIButton *_endBt; 18 | 19 | NSMutableArray *_dataArr; 20 | } 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | 29 | self.view.backgroundColor=[UIColor whiteColor]; 30 | 31 | //创建数据 32 | [self createData]; 33 | 34 | //创建UI 35 | [self createUI]; 36 | 37 | //设置代理(可选) 38 | [CDPReplay sharedReplay].delegate=self; 39 | } 40 | 41 | #pragma mark - 创建数据和UI 42 | //创建数据 43 | -(void)createData{ 44 | _dataArr=[[NSMutableArray alloc] init]; 45 | 46 | for (NSInteger i=0;i<130;i++) { 47 | NSString *str=[NSString stringWithFormat:@"CDPReplay测试数据%ld",(long)i]; 48 | [_dataArr addObject:str]; 49 | } 50 | } 51 | //创建UI 52 | -(void)createUI{ 53 | UITableView *tableView=[[UITableView alloc] initWithFrame:[UIScreen mainScreen].bounds style:UITableViewStylePlain]; 54 | tableView.showsHorizontalScrollIndicator=NO; 55 | tableView.separatorStyle=UITableViewCellSeparatorStyleNone; 56 | tableView.backgroundColor=[UIColor whiteColor]; 57 | tableView.dataSource=self; 58 | [self.view addSubview:tableView]; 59 | 60 | _startBt=[[UIButton alloc] initWithFrame:CGRectMake(0,100,80,50)]; 61 | _startBt.backgroundColor=[UIColor redColor]; 62 | [_startBt setTitle:@"开始录制" forState:UIControlStateNormal]; 63 | _startBt.titleLabel.font=[UIFont systemFontOfSize:14]; 64 | [_startBt addTarget:self action:@selector(start) forControlEvents:UIControlEventTouchUpInside]; 65 | [self.view addSubview:_startBt]; 66 | 67 | _endBt=[[UIButton alloc] initWithFrame:CGRectMake(0,200,80,50)]; 68 | _endBt.backgroundColor=[UIColor redColor]; 69 | [_endBt setTitle:@"结束录制" forState:UIControlStateNormal]; 70 | _endBt.titleLabel.font=[UIFont systemFontOfSize:14]; 71 | [_endBt addTarget:self action:@selector(end) forControlEvents:UIControlEventTouchUpInside]; 72 | [self.view addSubview:_endBt]; 73 | } 74 | #pragma mark - tableViewDataSource 75 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 76 | return _dataArr.count; 77 | } 78 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 79 | UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cell"]; 80 | if (cell==nil) { 81 | cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; 82 | } 83 | cell.textLabel.text=(indexPath.row<_dataArr.count)?_dataArr[indexPath.row]:@"妈卖批..."; 84 | 85 | return cell; 86 | } 87 | #pragma mark - 点击事件 88 | //开始录制 89 | -(void)start{ 90 | [[CDPReplay sharedReplay] startRecord]; 91 | 92 | [_startBt setTitle:@"初始化中" forState:UIControlStateNormal]; 93 | } 94 | //结束录制 95 | -(void)end{ 96 | [[CDPReplay sharedReplay] stopRecordAndShowVideoPreviewController:YES]; 97 | 98 | [_startBt setTitle:@"开始录制" forState:UIControlStateNormal]; 99 | } 100 | #pragma mark - CDPReplayDelegate代理 101 | /** 102 | * 开始录制回调 103 | */ 104 | -(void)replayRecordStart{ 105 | NSLog(@"~~~~开始录制"); 106 | [_startBt setTitle:@"正在录制" forState:UIControlStateNormal]; 107 | } 108 | 109 | /** 110 | * 录制结束或错误回调 111 | */ 112 | -(void)replayRecordFinishWithVC:(RPPreviewViewController *)previewViewController errorInfo:(NSString *)errorInfo{ 113 | 114 | NSLog(@"~~~~录制结束~~~错误信息(正常则无错误):%@",errorInfo); 115 | 116 | } 117 | /** 118 | * 保存到系统相册成功回调 119 | */ 120 | -(void)saveSuccess{ 121 | NSLog(@"~~~~保存到系统相册成功"); 122 | } 123 | 124 | 125 | 126 | 127 | 128 | - (void)didReceiveMemoryWarning { 129 | [super didReceiveMemoryWarning]; 130 | // Dispose of any resources that can be recreated. 131 | } 132 | 133 | 134 | @end 135 | -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/xcuserdata/CDP.xcuserdatad/xcschemes/CDPReplayDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/xcuserdata/he.xcuserdatad/xcschemes/CDPReplayDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /CDPReplay/CDPReplay.m: -------------------------------------------------------------------------------- 1 | // 2 | // CDPReplay.m 3 | // 4 | // Created by CDP on 16/11/9. 5 | // Copyright © 2016年 CDP. All rights reserved. 6 | // 7 | 8 | #import "CDPReplay.h" 9 | 10 | #ifdef DEBUG 11 | # define CDPLog(fmt,...) NSLog(fmt,##__VA_ARGS__) 12 | #else 13 | # define CDPLog(fmt,...) /* */ 14 | #endif 15 | 16 | 17 | @interface CDPReplay () 18 | 19 | @end 20 | 21 | @implementation CDPReplay 22 | 23 | //单例化对象 24 | +(instancetype)sharedReplay{ 25 | static CDPReplay *replay=nil; 26 | static dispatch_once_t token; 27 | dispatch_once(&token, ^{ 28 | replay=[[CDPReplay alloc] init]; 29 | }); 30 | return replay; 31 | } 32 | //是否正在录制 33 | -(BOOL)isRecording{ 34 | return [RPScreenRecorder sharedRecorder].recording; 35 | } 36 | #pragma mark - 开始/结束录制 37 | //开始录制 38 | -(void)startRecord{ 39 | if ([RPScreenRecorder sharedRecorder].recording==YES) { 40 | CDPLog(@"CDPReplay:已经开始录制"); 41 | return; 42 | } 43 | if ([self systemVersionOK]) { 44 | if ([[RPScreenRecorder sharedRecorder] isAvailable]) { 45 | CDPLog(@"CDPReplay:录制开始初始化"); 46 | 47 | [[RPScreenRecorder sharedRecorder] startRecordingWithMicrophoneEnabled:YES handler:^(NSError *error){ 48 | if (error) { 49 | CDPLog(@"CDPReplay:开始录制error %@",error); 50 | if ([_delegate respondsToSelector:@selector(replayRecordFinishWithVC:errorInfo:)]) { 51 | [_delegate replayRecordFinishWithVC:nil errorInfo:[NSString stringWithFormat:@"CDPReplay:开始录制error %@",error]]; 52 | } 53 | } 54 | else{ 55 | CDPLog(@"CDPReplay:开始录制"); 56 | if ([_delegate respondsToSelector:@selector(replayRecordStart)]) { 57 | [_delegate replayRecordStart]; 58 | } 59 | } 60 | }]; 61 | } 62 | else { 63 | CDPLog(@"CDPReplay:环境不支持ReplayKit录制"); 64 | if ([_delegate respondsToSelector:@selector(replayRecordFinishWithVC:errorInfo:)]) { 65 | [_delegate replayRecordFinishWithVC:nil errorInfo:@"CDPReplay:环境不支持ReplayKit录制"]; 66 | } 67 | } 68 | } 69 | else{ 70 | CDPLog(@"CDPReplay:系统版本需要是iOS9.0及以上才支持ReplayKit录制"); 71 | if ([_delegate respondsToSelector:@selector(replayRecordFinishWithVC:errorInfo:)]) { 72 | [_delegate replayRecordFinishWithVC:nil errorInfo:@"CDPReplay:系统版本需要是iOS9.0及以上才支持ReplayKit录制"]; 73 | } 74 | } 75 | } 76 | //结束录制 77 | -(void)stopRecordAndShowVideoPreviewController:(BOOL)isShow{ 78 | CDPLog(@"CDPReplay:正在结束录制"); 79 | [[RPScreenRecorder sharedRecorder] stopRecordingWithHandler:^(RPPreviewViewController *previewViewController, NSError * error){ 80 | if (error) { 81 | CDPLog(@"CDPReplay:结束录制error %@", error); 82 | if ([_delegate respondsToSelector:@selector(replayRecordFinishWithVC:errorInfo:)]) { 83 | [_delegate replayRecordFinishWithVC:nil errorInfo:[NSString stringWithFormat:@"CDPReplay:结束录制error %@",error]]; 84 | } 85 | } 86 | else { 87 | CDPLog(@"CDPReplay:录制完成"); 88 | if ([_delegate respondsToSelector:@selector(replayRecordFinishWithVC:errorInfo:)]) { 89 | [_delegate replayRecordFinishWithVC:previewViewController errorInfo:@""]; 90 | } 91 | if (isShow) { 92 | [self showVideoPreviewController:previewViewController animation:YES]; 93 | } 94 | } 95 | }]; 96 | } 97 | #pragma mark - 显示/关闭视频预览页 98 | //显示视频预览页面 99 | -(void)showVideoPreviewController:(RPPreviewViewController *)previewController animation:(BOOL)animation { 100 | previewController.previewControllerDelegate=self; 101 | 102 | __weak UIViewController *rootVC=[self getRootVC]; 103 | 104 | dispatch_async(dispatch_get_main_queue(), ^{ 105 | CGRect rect = [UIScreen mainScreen].bounds; 106 | 107 | if (animation) { 108 | rect.origin.x+=rect.size.width; 109 | previewController.view.frame=rect; 110 | rect.origin.x-=rect.size.width; 111 | [UIView animateWithDuration:0.3 animations:^(){ 112 | previewController.view.frame=rect; 113 | }]; 114 | } 115 | else{ 116 | previewController.view.frame=rect; 117 | } 118 | 119 | [rootVC.view addSubview:previewController.view]; 120 | [rootVC addChildViewController:previewController]; 121 | }); 122 | 123 | } 124 | //关闭视频预览页面 125 | -(void)hideVideoPreviewController:(RPPreviewViewController *)previewController animation:(BOOL)animation { 126 | previewController.previewControllerDelegate=nil; 127 | 128 | dispatch_async(dispatch_get_main_queue(), ^{ 129 | CGRect rect = previewController.view.frame; 130 | 131 | if (animation) { 132 | rect.origin.x+=rect.size.width; 133 | [UIView animateWithDuration:0.3 animations:^(){ 134 | previewController.view.frame=rect; 135 | }completion:^(BOOL finished){ 136 | [previewController.view removeFromSuperview]; 137 | [previewController removeFromParentViewController]; 138 | }]; 139 | 140 | } 141 | else{ 142 | [previewController.view removeFromSuperview]; 143 | [previewController removeFromParentViewController]; 144 | } 145 | }); 146 | } 147 | #pragma mark - 视频预览页回调 148 | //关闭的回调 149 | - (void)previewControllerDidFinish:(RPPreviewViewController *)previewController { 150 | [self hideVideoPreviewController:previewController animation:YES]; 151 | } 152 | //选择了某些功能的回调(如分享和保存) 153 | - (void)previewController:(RPPreviewViewController *)previewController didFinishWithActivityTypes:(NSSet *)activityTypes { 154 | if ([activityTypes containsObject:@"com.apple.UIKit.activity.SaveToCameraRoll"]) { 155 | CDPLog(@"CDPReplay:保存到相册成功"); 156 | if ([_delegate respondsToSelector:@selector(saveSuccess)]) { 157 | [_delegate saveSuccess]; 158 | } 159 | } 160 | if ([activityTypes containsObject:@"com.apple.UIKit.activity.CopyToPasteboard"]) { 161 | CDPLog(@"CDPReplay:复制成功"); 162 | } 163 | } 164 | #pragma mark - 其他方法 165 | //判断对应系统版本是否支持ReplayKit 166 | -(BOOL)systemVersionOK{ 167 | if ([[UIDevice currentDevice].systemVersion floatValue]<9.0) { 168 | return NO; 169 | } else { 170 | return YES; 171 | } 172 | } 173 | //获取rootVC 174 | -(UIViewController *)getRootVC{ 175 | return [UIApplication sharedApplication].delegate.window.rootViewController; 176 | } 177 | 178 | @end 179 | -------------------------------------------------------------------------------- /CDPReplayDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 87BC33FC1E7FB71E00C8FEDF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BC33FB1E7FB71E00C8FEDF /* main.m */; }; 11 | 87BC33FF1E7FB71E00C8FEDF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BC33FE1E7FB71E00C8FEDF /* AppDelegate.m */; }; 12 | 87BC34021E7FB71E00C8FEDF /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BC34011E7FB71E00C8FEDF /* ViewController.m */; }; 13 | 87BC34051E7FB71E00C8FEDF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 87BC34031E7FB71E00C8FEDF /* Main.storyboard */; }; 14 | 87BC34071E7FB71E00C8FEDF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 87BC34061E7FB71E00C8FEDF /* Assets.xcassets */; }; 15 | 87BC340A1E7FB71E00C8FEDF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 87BC34081E7FB71E00C8FEDF /* LaunchScreen.storyboard */; }; 16 | 87BC34151E7FB71F00C8FEDF /* CDPReplayDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BC34141E7FB71F00C8FEDF /* CDPReplayDemoTests.m */; }; 17 | 87BC34201E7FB71F00C8FEDF /* CDPReplayDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BC341F1E7FB71F00C8FEDF /* CDPReplayDemoUITests.m */; }; 18 | 87BC34301E7FB73F00C8FEDF /* CDPReplay.m in Sources */ = {isa = PBXBuildFile; fileRef = 87BC342F1E7FB73F00C8FEDF /* CDPReplay.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 87BC34111E7FB71F00C8FEDF /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 87BC33EF1E7FB71E00C8FEDF /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 87BC33F61E7FB71E00C8FEDF; 27 | remoteInfo = CDPReplayDemo; 28 | }; 29 | 87BC341C1E7FB71F00C8FEDF /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 87BC33EF1E7FB71E00C8FEDF /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 87BC33F61E7FB71E00C8FEDF; 34 | remoteInfo = CDPReplayDemo; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 87BC33F71E7FB71E00C8FEDF /* CDPReplayDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CDPReplayDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 87BC33FB1E7FB71E00C8FEDF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 41 | 87BC33FD1E7FB71E00C8FEDF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 42 | 87BC33FE1E7FB71E00C8FEDF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 43 | 87BC34001E7FB71E00C8FEDF /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 44 | 87BC34011E7FB71E00C8FEDF /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 45 | 87BC34041E7FB71E00C8FEDF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 87BC34061E7FB71E00C8FEDF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 87BC34091E7FB71E00C8FEDF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 87BC340B1E7FB71E00C8FEDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 87BC34101E7FB71F00C8FEDF /* CDPReplayDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDPReplayDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 87BC34141E7FB71F00C8FEDF /* CDPReplayDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDPReplayDemoTests.m; sourceTree = ""; }; 51 | 87BC34161E7FB71F00C8FEDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 87BC341B1E7FB71F00C8FEDF /* CDPReplayDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDPReplayDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 87BC341F1E7FB71F00C8FEDF /* CDPReplayDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDPReplayDemoUITests.m; sourceTree = ""; }; 54 | 87BC34211E7FB71F00C8FEDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 87BC342E1E7FB73F00C8FEDF /* CDPReplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDPReplay.h; sourceTree = ""; }; 56 | 87BC342F1E7FB73F00C8FEDF /* CDPReplay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDPReplay.m; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 87BC33F41E7FB71E00C8FEDF /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 87BC340D1E7FB71F00C8FEDF /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 87BC34181E7FB71F00C8FEDF /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 87BC33EE1E7FB71E00C8FEDF = { 85 | isa = PBXGroup; 86 | children = ( 87 | 87BC342D1E7FB73F00C8FEDF /* CDPReplay */, 88 | 87BC33F91E7FB71E00C8FEDF /* CDPReplayDemo */, 89 | 87BC34131E7FB71F00C8FEDF /* CDPReplayDemoTests */, 90 | 87BC341E1E7FB71F00C8FEDF /* CDPReplayDemoUITests */, 91 | 87BC33F81E7FB71E00C8FEDF /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | 87BC33F81E7FB71E00C8FEDF /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 87BC33F71E7FB71E00C8FEDF /* CDPReplayDemo.app */, 99 | 87BC34101E7FB71F00C8FEDF /* CDPReplayDemoTests.xctest */, 100 | 87BC341B1E7FB71F00C8FEDF /* CDPReplayDemoUITests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 87BC33F91E7FB71E00C8FEDF /* CDPReplayDemo */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 87BC33FD1E7FB71E00C8FEDF /* AppDelegate.h */, 109 | 87BC33FE1E7FB71E00C8FEDF /* AppDelegate.m */, 110 | 87BC34001E7FB71E00C8FEDF /* ViewController.h */, 111 | 87BC34011E7FB71E00C8FEDF /* ViewController.m */, 112 | 87BC34031E7FB71E00C8FEDF /* Main.storyboard */, 113 | 87BC34061E7FB71E00C8FEDF /* Assets.xcassets */, 114 | 87BC34081E7FB71E00C8FEDF /* LaunchScreen.storyboard */, 115 | 87BC340B1E7FB71E00C8FEDF /* Info.plist */, 116 | 87BC33FA1E7FB71E00C8FEDF /* Supporting Files */, 117 | ); 118 | path = CDPReplayDemo; 119 | sourceTree = ""; 120 | }; 121 | 87BC33FA1E7FB71E00C8FEDF /* Supporting Files */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 87BC33FB1E7FB71E00C8FEDF /* main.m */, 125 | ); 126 | name = "Supporting Files"; 127 | sourceTree = ""; 128 | }; 129 | 87BC34131E7FB71F00C8FEDF /* CDPReplayDemoTests */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 87BC34141E7FB71F00C8FEDF /* CDPReplayDemoTests.m */, 133 | 87BC34161E7FB71F00C8FEDF /* Info.plist */, 134 | ); 135 | path = CDPReplayDemoTests; 136 | sourceTree = ""; 137 | }; 138 | 87BC341E1E7FB71F00C8FEDF /* CDPReplayDemoUITests */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 87BC341F1E7FB71F00C8FEDF /* CDPReplayDemoUITests.m */, 142 | 87BC34211E7FB71F00C8FEDF /* Info.plist */, 143 | ); 144 | path = CDPReplayDemoUITests; 145 | sourceTree = ""; 146 | }; 147 | 87BC342D1E7FB73F00C8FEDF /* CDPReplay */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 87BC342E1E7FB73F00C8FEDF /* CDPReplay.h */, 151 | 87BC342F1E7FB73F00C8FEDF /* CDPReplay.m */, 152 | ); 153 | path = CDPReplay; 154 | sourceTree = ""; 155 | }; 156 | /* End PBXGroup section */ 157 | 158 | /* Begin PBXNativeTarget section */ 159 | 87BC33F61E7FB71E00C8FEDF /* CDPReplayDemo */ = { 160 | isa = PBXNativeTarget; 161 | buildConfigurationList = 87BC34241E7FB71F00C8FEDF /* Build configuration list for PBXNativeTarget "CDPReplayDemo" */; 162 | buildPhases = ( 163 | 87BC33F31E7FB71E00C8FEDF /* Sources */, 164 | 87BC33F41E7FB71E00C8FEDF /* Frameworks */, 165 | 87BC33F51E7FB71E00C8FEDF /* Resources */, 166 | ); 167 | buildRules = ( 168 | ); 169 | dependencies = ( 170 | ); 171 | name = CDPReplayDemo; 172 | productName = CDPReplayDemo; 173 | productReference = 87BC33F71E7FB71E00C8FEDF /* CDPReplayDemo.app */; 174 | productType = "com.apple.product-type.application"; 175 | }; 176 | 87BC340F1E7FB71F00C8FEDF /* CDPReplayDemoTests */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = 87BC34271E7FB71F00C8FEDF /* Build configuration list for PBXNativeTarget "CDPReplayDemoTests" */; 179 | buildPhases = ( 180 | 87BC340C1E7FB71F00C8FEDF /* Sources */, 181 | 87BC340D1E7FB71F00C8FEDF /* Frameworks */, 182 | 87BC340E1E7FB71F00C8FEDF /* Resources */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | 87BC34121E7FB71F00C8FEDF /* PBXTargetDependency */, 188 | ); 189 | name = CDPReplayDemoTests; 190 | productName = CDPReplayDemoTests; 191 | productReference = 87BC34101E7FB71F00C8FEDF /* CDPReplayDemoTests.xctest */; 192 | productType = "com.apple.product-type.bundle.unit-test"; 193 | }; 194 | 87BC341A1E7FB71F00C8FEDF /* CDPReplayDemoUITests */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = 87BC342A1E7FB71F00C8FEDF /* Build configuration list for PBXNativeTarget "CDPReplayDemoUITests" */; 197 | buildPhases = ( 198 | 87BC34171E7FB71F00C8FEDF /* Sources */, 199 | 87BC34181E7FB71F00C8FEDF /* Frameworks */, 200 | 87BC34191E7FB71F00C8FEDF /* Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | 87BC341D1E7FB71F00C8FEDF /* PBXTargetDependency */, 206 | ); 207 | name = CDPReplayDemoUITests; 208 | productName = CDPReplayDemoUITests; 209 | productReference = 87BC341B1E7FB71F00C8FEDF /* CDPReplayDemoUITests.xctest */; 210 | productType = "com.apple.product-type.bundle.ui-testing"; 211 | }; 212 | /* End PBXNativeTarget section */ 213 | 214 | /* Begin PBXProject section */ 215 | 87BC33EF1E7FB71E00C8FEDF /* Project object */ = { 216 | isa = PBXProject; 217 | attributes = { 218 | LastUpgradeCheck = 0820; 219 | ORGANIZATIONNAME = CDP; 220 | TargetAttributes = { 221 | 87BC33F61E7FB71E00C8FEDF = { 222 | CreatedOnToolsVersion = 8.2.1; 223 | DevelopmentTeam = JR6PW676NW; 224 | ProvisioningStyle = Automatic; 225 | }; 226 | 87BC340F1E7FB71F00C8FEDF = { 227 | CreatedOnToolsVersion = 8.2.1; 228 | ProvisioningStyle = Automatic; 229 | TestTargetID = 87BC33F61E7FB71E00C8FEDF; 230 | }; 231 | 87BC341A1E7FB71F00C8FEDF = { 232 | CreatedOnToolsVersion = 8.2.1; 233 | ProvisioningStyle = Automatic; 234 | TestTargetID = 87BC33F61E7FB71E00C8FEDF; 235 | }; 236 | }; 237 | }; 238 | buildConfigurationList = 87BC33F21E7FB71E00C8FEDF /* Build configuration list for PBXProject "CDPReplayDemo" */; 239 | compatibilityVersion = "Xcode 3.2"; 240 | developmentRegion = English; 241 | hasScannedForEncodings = 0; 242 | knownRegions = ( 243 | en, 244 | Base, 245 | ); 246 | mainGroup = 87BC33EE1E7FB71E00C8FEDF; 247 | productRefGroup = 87BC33F81E7FB71E00C8FEDF /* Products */; 248 | projectDirPath = ""; 249 | projectRoot = ""; 250 | targets = ( 251 | 87BC33F61E7FB71E00C8FEDF /* CDPReplayDemo */, 252 | 87BC340F1E7FB71F00C8FEDF /* CDPReplayDemoTests */, 253 | 87BC341A1E7FB71F00C8FEDF /* CDPReplayDemoUITests */, 254 | ); 255 | }; 256 | /* End PBXProject section */ 257 | 258 | /* Begin PBXResourcesBuildPhase section */ 259 | 87BC33F51E7FB71E00C8FEDF /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | 87BC340A1E7FB71E00C8FEDF /* LaunchScreen.storyboard in Resources */, 264 | 87BC34071E7FB71E00C8FEDF /* Assets.xcassets in Resources */, 265 | 87BC34051E7FB71E00C8FEDF /* Main.storyboard in Resources */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | 87BC340E1E7FB71F00C8FEDF /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | 87BC34191E7FB71F00C8FEDF /* Resources */ = { 277 | isa = PBXResourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | /* End PBXResourcesBuildPhase section */ 284 | 285 | /* Begin PBXSourcesBuildPhase section */ 286 | 87BC33F31E7FB71E00C8FEDF /* Sources */ = { 287 | isa = PBXSourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | 87BC34021E7FB71E00C8FEDF /* ViewController.m in Sources */, 291 | 87BC33FF1E7FB71E00C8FEDF /* AppDelegate.m in Sources */, 292 | 87BC34301E7FB73F00C8FEDF /* CDPReplay.m in Sources */, 293 | 87BC33FC1E7FB71E00C8FEDF /* main.m in Sources */, 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | 87BC340C1E7FB71F00C8FEDF /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | 87BC34151E7FB71F00C8FEDF /* CDPReplayDemoTests.m in Sources */, 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | 87BC34171E7FB71F00C8FEDF /* Sources */ = { 306 | isa = PBXSourcesBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | 87BC34201E7FB71F00C8FEDF /* CDPReplayDemoUITests.m in Sources */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | /* End PBXSourcesBuildPhase section */ 314 | 315 | /* Begin PBXTargetDependency section */ 316 | 87BC34121E7FB71F00C8FEDF /* PBXTargetDependency */ = { 317 | isa = PBXTargetDependency; 318 | target = 87BC33F61E7FB71E00C8FEDF /* CDPReplayDemo */; 319 | targetProxy = 87BC34111E7FB71F00C8FEDF /* PBXContainerItemProxy */; 320 | }; 321 | 87BC341D1E7FB71F00C8FEDF /* PBXTargetDependency */ = { 322 | isa = PBXTargetDependency; 323 | target = 87BC33F61E7FB71E00C8FEDF /* CDPReplayDemo */; 324 | targetProxy = 87BC341C1E7FB71F00C8FEDF /* PBXContainerItemProxy */; 325 | }; 326 | /* End PBXTargetDependency section */ 327 | 328 | /* Begin PBXVariantGroup section */ 329 | 87BC34031E7FB71E00C8FEDF /* Main.storyboard */ = { 330 | isa = PBXVariantGroup; 331 | children = ( 332 | 87BC34041E7FB71E00C8FEDF /* Base */, 333 | ); 334 | name = Main.storyboard; 335 | sourceTree = ""; 336 | }; 337 | 87BC34081E7FB71E00C8FEDF /* LaunchScreen.storyboard */ = { 338 | isa = PBXVariantGroup; 339 | children = ( 340 | 87BC34091E7FB71E00C8FEDF /* Base */, 341 | ); 342 | name = LaunchScreen.storyboard; 343 | sourceTree = ""; 344 | }; 345 | /* End PBXVariantGroup section */ 346 | 347 | /* Begin XCBuildConfiguration section */ 348 | 87BC34221E7FB71F00C8FEDF /* Debug */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ALWAYS_SEARCH_USER_PATHS = NO; 352 | CLANG_ANALYZER_NONNULL = YES; 353 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 354 | CLANG_CXX_LIBRARY = "libc++"; 355 | CLANG_ENABLE_MODULES = YES; 356 | CLANG_ENABLE_OBJC_ARC = YES; 357 | CLANG_WARN_BOOL_CONVERSION = YES; 358 | CLANG_WARN_CONSTANT_CONVERSION = YES; 359 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 360 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 361 | CLANG_WARN_EMPTY_BODY = YES; 362 | CLANG_WARN_ENUM_CONVERSION = YES; 363 | CLANG_WARN_INFINITE_RECURSION = YES; 364 | CLANG_WARN_INT_CONVERSION = YES; 365 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 366 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 367 | CLANG_WARN_UNREACHABLE_CODE = YES; 368 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 369 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 370 | COPY_PHASE_STRIP = NO; 371 | DEBUG_INFORMATION_FORMAT = dwarf; 372 | ENABLE_STRICT_OBJC_MSGSEND = YES; 373 | ENABLE_TESTABILITY = YES; 374 | GCC_C_LANGUAGE_STANDARD = gnu99; 375 | GCC_DYNAMIC_NO_PIC = NO; 376 | GCC_NO_COMMON_BLOCKS = YES; 377 | GCC_OPTIMIZATION_LEVEL = 0; 378 | GCC_PREPROCESSOR_DEFINITIONS = ( 379 | "DEBUG=1", 380 | "$(inherited)", 381 | ); 382 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 383 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 384 | GCC_WARN_UNDECLARED_SELECTOR = YES; 385 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 386 | GCC_WARN_UNUSED_FUNCTION = YES; 387 | GCC_WARN_UNUSED_VARIABLE = YES; 388 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 389 | MTL_ENABLE_DEBUG_INFO = YES; 390 | ONLY_ACTIVE_ARCH = YES; 391 | SDKROOT = iphoneos; 392 | TARGETED_DEVICE_FAMILY = "1,2"; 393 | }; 394 | name = Debug; 395 | }; 396 | 87BC34231E7FB71F00C8FEDF /* Release */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ALWAYS_SEARCH_USER_PATHS = NO; 400 | CLANG_ANALYZER_NONNULL = YES; 401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 402 | CLANG_CXX_LIBRARY = "libc++"; 403 | CLANG_ENABLE_MODULES = YES; 404 | CLANG_ENABLE_OBJC_ARC = YES; 405 | CLANG_WARN_BOOL_CONVERSION = YES; 406 | CLANG_WARN_CONSTANT_CONVERSION = YES; 407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 408 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 409 | CLANG_WARN_EMPTY_BODY = YES; 410 | CLANG_WARN_ENUM_CONVERSION = YES; 411 | CLANG_WARN_INFINITE_RECURSION = YES; 412 | CLANG_WARN_INT_CONVERSION = YES; 413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 414 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 415 | CLANG_WARN_UNREACHABLE_CODE = YES; 416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 418 | COPY_PHASE_STRIP = NO; 419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 420 | ENABLE_NS_ASSERTIONS = NO; 421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_NO_COMMON_BLOCKS = YES; 424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 426 | GCC_WARN_UNDECLARED_SELECTOR = YES; 427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 428 | GCC_WARN_UNUSED_FUNCTION = YES; 429 | GCC_WARN_UNUSED_VARIABLE = YES; 430 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 431 | MTL_ENABLE_DEBUG_INFO = NO; 432 | SDKROOT = iphoneos; 433 | TARGETED_DEVICE_FAMILY = "1,2"; 434 | VALIDATE_PRODUCT = YES; 435 | }; 436 | name = Release; 437 | }; 438 | 87BC34251E7FB71F00C8FEDF /* Debug */ = { 439 | isa = XCBuildConfiguration; 440 | buildSettings = { 441 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 442 | DEVELOPMENT_TEAM = JR6PW676NW; 443 | INFOPLIST_FILE = CDPReplayDemo/Info.plist; 444 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 446 | PRODUCT_BUNDLE_IDENTIFIER = CDP.CDPReplayDemo; 447 | PRODUCT_NAME = "$(TARGET_NAME)"; 448 | }; 449 | name = Debug; 450 | }; 451 | 87BC34261E7FB71F00C8FEDF /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 455 | DEVELOPMENT_TEAM = JR6PW676NW; 456 | INFOPLIST_FILE = CDPReplayDemo/Info.plist; 457 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 458 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 459 | PRODUCT_BUNDLE_IDENTIFIER = CDP.CDPReplayDemo; 460 | PRODUCT_NAME = "$(TARGET_NAME)"; 461 | }; 462 | name = Release; 463 | }; 464 | 87BC34281E7FB71F00C8FEDF /* Debug */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | BUNDLE_LOADER = "$(TEST_HOST)"; 468 | INFOPLIST_FILE = CDPReplayDemoTests/Info.plist; 469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 470 | PRODUCT_BUNDLE_IDENTIFIER = CDP.CDPReplayDemoTests; 471 | PRODUCT_NAME = "$(TARGET_NAME)"; 472 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CDPReplayDemo.app/CDPReplayDemo"; 473 | }; 474 | name = Debug; 475 | }; 476 | 87BC34291E7FB71F00C8FEDF /* Release */ = { 477 | isa = XCBuildConfiguration; 478 | buildSettings = { 479 | BUNDLE_LOADER = "$(TEST_HOST)"; 480 | INFOPLIST_FILE = CDPReplayDemoTests/Info.plist; 481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 482 | PRODUCT_BUNDLE_IDENTIFIER = CDP.CDPReplayDemoTests; 483 | PRODUCT_NAME = "$(TARGET_NAME)"; 484 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CDPReplayDemo.app/CDPReplayDemo"; 485 | }; 486 | name = Release; 487 | }; 488 | 87BC342B1E7FB71F00C8FEDF /* Debug */ = { 489 | isa = XCBuildConfiguration; 490 | buildSettings = { 491 | INFOPLIST_FILE = CDPReplayDemoUITests/Info.plist; 492 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 493 | PRODUCT_BUNDLE_IDENTIFIER = CDP.CDPReplayDemoUITests; 494 | PRODUCT_NAME = "$(TARGET_NAME)"; 495 | TEST_TARGET_NAME = CDPReplayDemo; 496 | }; 497 | name = Debug; 498 | }; 499 | 87BC342C1E7FB71F00C8FEDF /* Release */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | INFOPLIST_FILE = CDPReplayDemoUITests/Info.plist; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 504 | PRODUCT_BUNDLE_IDENTIFIER = CDP.CDPReplayDemoUITests; 505 | PRODUCT_NAME = "$(TARGET_NAME)"; 506 | TEST_TARGET_NAME = CDPReplayDemo; 507 | }; 508 | name = Release; 509 | }; 510 | /* End XCBuildConfiguration section */ 511 | 512 | /* Begin XCConfigurationList section */ 513 | 87BC33F21E7FB71E00C8FEDF /* Build configuration list for PBXProject "CDPReplayDemo" */ = { 514 | isa = XCConfigurationList; 515 | buildConfigurations = ( 516 | 87BC34221E7FB71F00C8FEDF /* Debug */, 517 | 87BC34231E7FB71F00C8FEDF /* Release */, 518 | ); 519 | defaultConfigurationIsVisible = 0; 520 | defaultConfigurationName = Release; 521 | }; 522 | 87BC34241E7FB71F00C8FEDF /* Build configuration list for PBXNativeTarget "CDPReplayDemo" */ = { 523 | isa = XCConfigurationList; 524 | buildConfigurations = ( 525 | 87BC34251E7FB71F00C8FEDF /* Debug */, 526 | 87BC34261E7FB71F00C8FEDF /* Release */, 527 | ); 528 | defaultConfigurationIsVisible = 0; 529 | defaultConfigurationName = Release; 530 | }; 531 | 87BC34271E7FB71F00C8FEDF /* Build configuration list for PBXNativeTarget "CDPReplayDemoTests" */ = { 532 | isa = XCConfigurationList; 533 | buildConfigurations = ( 534 | 87BC34281E7FB71F00C8FEDF /* Debug */, 535 | 87BC34291E7FB71F00C8FEDF /* Release */, 536 | ); 537 | defaultConfigurationIsVisible = 0; 538 | defaultConfigurationName = Release; 539 | }; 540 | 87BC342A1E7FB71F00C8FEDF /* Build configuration list for PBXNativeTarget "CDPReplayDemoUITests" */ = { 541 | isa = XCConfigurationList; 542 | buildConfigurations = ( 543 | 87BC342B1E7FB71F00C8FEDF /* Debug */, 544 | 87BC342C1E7FB71F00C8FEDF /* Release */, 545 | ); 546 | defaultConfigurationIsVisible = 0; 547 | defaultConfigurationName = Release; 548 | }; 549 | /* End XCConfigurationList section */ 550 | }; 551 | rootObject = 87BC33EF1E7FB71E00C8FEDF /* Project object */; 552 | } 553 | --------------------------------------------------------------------------------