├── XDCaptureService ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── XDVideoWritter.h │ ├── XDCaptureService.h │ ├── XDVideoWritter.m │ └── XDCaptureService.m ├── _Pods.xcodeproj ├── Example ├── Tests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Tests-Prefix.pch │ ├── Tests-Info.plist │ └── Tests.m ├── XDCaptureService │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── XDViewController.h │ ├── XDAppDelegate.h │ ├── XDCaptureService-Prefix.pch │ ├── main.m │ ├── XDCaptureService-Info.plist │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── XDAppDelegate.m │ └── XDViewController.m ├── Pods │ ├── Target Support Files │ │ ├── XDCaptureService │ │ │ ├── XDCaptureService.modulemap │ │ │ ├── XDCaptureService-dummy.m │ │ │ ├── XDCaptureService-prefix.pch │ │ │ ├── XDCaptureService-umbrella.h │ │ │ ├── XDCaptureService.xcconfig │ │ │ └── Info.plist │ │ ├── Pods-XDCaptureService_Tests │ │ │ ├── Pods-XDCaptureService_Tests-acknowledgements.markdown │ │ │ ├── Pods-XDCaptureService_Tests.modulemap │ │ │ ├── Pods-XDCaptureService_Tests-dummy.m │ │ │ ├── Pods-XDCaptureService_Tests-umbrella.h │ │ │ ├── Pods-XDCaptureService_Tests.debug.xcconfig │ │ │ ├── Pods-XDCaptureService_Tests.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-XDCaptureService_Tests-acknowledgements.plist │ │ │ ├── Pods-XDCaptureService_Tests-resources.sh │ │ │ └── Pods-XDCaptureService_Tests-frameworks.sh │ │ └── Pods-XDCaptureService_Example │ │ │ ├── Pods-XDCaptureService_Example.modulemap │ │ │ ├── Pods-XDCaptureService_Example-dummy.m │ │ │ ├── Pods-XDCaptureService_Example-umbrella.h │ │ │ ├── Pods-XDCaptureService_Example.debug.xcconfig │ │ │ ├── Pods-XDCaptureService_Example.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-XDCaptureService_Example-acknowledgements.markdown │ │ │ ├── Pods-XDCaptureService_Example-acknowledgements.plist │ │ │ ├── Pods-XDCaptureService_Example-resources.sh │ │ │ └── Pods-XDCaptureService_Example-frameworks.sh │ ├── Manifest.lock │ ├── Local Podspecs │ │ └── XDCaptureService.podspec.json │ └── Pods.xcodeproj │ │ └── project.pbxproj ├── Podfile ├── XDCaptureService.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj ├── XDCaptureService.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Podfile.lock ├── .travis.yml ├── .gitignore ├── XDCaptureService.podspec ├── LICENSE └── README.md /XDCaptureService/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /XDCaptureService/Classes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/XDCaptureService/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XDCaptureService/XDCaptureService.modulemap: -------------------------------------------------------------------------------- 1 | framework module XDCaptureService { 2 | umbrella header "XDCaptureService-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XDCaptureService/XDCaptureService-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_XDCaptureService : NSObject 3 | @end 4 | @implementation PodsDummy_XDCaptureService 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'XDCaptureService_Example' do 4 | pod 'XDCaptureService', :path => '../' 5 | 6 | target 'XDCaptureService_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_XDCaptureService_Tests { 2 | umbrella header "Pods-XDCaptureService_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/XDCaptureService.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_XDCaptureService_Example { 2 | umbrella header "Pods-XDCaptureService_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XDCaptureService_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XDCaptureService_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XDCaptureService_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XDCaptureService_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XDCaptureService/XDCaptureService-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/XDCaptureService/XDViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // XDViewController.h 3 | // XDCaptureService 4 | // 5 | // Created by 458770054@qq.com on 01/29/2018. 6 | // Copyright (c) 2018 458770054@qq.com. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface XDViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/XDCaptureService.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/XDCaptureService.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - XDCaptureService (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - XDCaptureService (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | XDCaptureService: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | XDCaptureService: 0a4474ce6e89afb00504f9b8ee8905541d18eb6b 13 | 14 | PODFILE CHECKSUM: f6ad2c5f441c147c2ea204c754b7286ae62c50d5 15 | 16 | COCOAPODS: 1.5.0 17 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - XDCaptureService (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - XDCaptureService (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | XDCaptureService: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | XDCaptureService: 0a4474ce6e89afb00504f9b8ee8905541d18eb6b 13 | 14 | PODFILE CHECKSUM: f6ad2c5f441c147c2ea204c754b7286ae62c50d5 15 | 16 | COCOAPODS: 1.5.0 17 | -------------------------------------------------------------------------------- /Example/XDCaptureService/XDAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // XDAppDelegate.h 3 | // XDCaptureService 4 | // 5 | // Created by 458770054@qq.com on 01/29/2018. 6 | // Copyright (c) 2018 458770054@qq.com. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface XDAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/XDCaptureService/XDCaptureService-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/XDCaptureService/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // XDCaptureService 4 | // 5 | // Created by 458770054@qq.com on 01/29/2018. 6 | // Copyright (c) 2018 458770054@qq.com. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "XDAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([XDAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XDCaptureService/XDCaptureService-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "XDCaptureService.h" 14 | 15 | FOUNDATION_EXPORT double XDCaptureServiceVersionNumber; 16 | FOUNDATION_EXPORT const unsigned char XDCaptureServiceVersionString[]; 17 | 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_XDCaptureService_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_XDCaptureService_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_XDCaptureService_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_XDCaptureService_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XDCaptureService/XDCaptureService.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = -framework "AVFoundation" -framework "CoreImage" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/XDCaptureService.xcworkspace -scheme XDCaptureService-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService/XDCaptureService.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService/XDCaptureService.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService/XDCaptureService.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "XDCaptureService" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/XDCaptureService/XDCaptureService.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "XDCaptureService" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/XDCaptureService.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XDCaptureService", 3 | "version": "1.0.0", 4 | "summary": "A short description of XDCaptureService.", 5 | "homepage": "https://github.com/caixindong/XDCaptureService", 6 | "license": { 7 | "type": "MIT", 8 | "file": "LICENSE" 9 | }, 10 | "authors": { 11 | "458770054@qq.com": "458770054@qq.com" 12 | }, 13 | "source": { 14 | "git": "https://github.com/caixindong/XDCaptureService.git", 15 | "tag": "1.0.0" 16 | }, 17 | "platforms": { 18 | "ios": "8.0" 19 | }, 20 | "source_files": "XDCaptureService/Classes/**/*", 21 | "public_header_files": "XDCaptureService/Classes/XDCaptureService.h", 22 | "frameworks": [ 23 | "AVFoundation", 24 | "CoreImage" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /Example/Tests/Tests-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 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // XDCaptureServiceTests.m 3 | // XDCaptureServiceTests 4 | // 5 | // Created by 458770054@qq.com on 01/29/2018. 6 | // Copyright (c) 2018 458770054@qq.com. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XDCaptureService/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /XDCaptureService/Classes/XDVideoWritter.h: -------------------------------------------------------------------------------- 1 | // 2 | // XDVideoWritter.h 3 | // XDCaptureService 4 | // 5 | // Created by 蔡欣东 on 2018/2/26. 6 | // 7 | 8 | #import 9 | 10 | @class XDVideoWritter; 11 | 12 | @protocol XDVideoWritterDelegate 13 | 14 | @optional 15 | 16 | - (void)videoWritter:(XDVideoWritter *)writter didFailWithError:(NSError *)error; 17 | 18 | - (void)videoWritter:(XDVideoWritter *)writter completeWriting:(NSError *)error; 19 | 20 | @end 21 | 22 | @interface XDVideoWritter : NSObject 23 | 24 | @property (nonatomic, readonly, assign) BOOL isWriting; 25 | 26 | @property (nonatomic, assign) id delegate; 27 | 28 | - (instancetype)initWithURL:(NSURL*)URL 29 | VideoSettings:(NSDictionary *)videoSetting 30 | audioSetting:(NSDictionary *)audioSetting; 31 | 32 | - (void)startWriting; 33 | 34 | - (void)cancleWriting; 35 | 36 | - (void)stopWritingAsyn; 37 | 38 | - (void)appendSampleBuffer:(CMSampleBufferRef)sampleBuffer; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /XDCaptureService.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint XDCaptureService.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'XDCaptureService' 11 | s.version = '1.2.0' 12 | s.summary = 'A short description of XDCaptureService.' 13 | s.homepage = 'https://github.com/caixindong/XDCaptureService' 14 | s.license = { :type => 'MIT', :file => 'LICENSE' } 15 | s.author = { '458770054@qq.com' => '458770054@qq.com' } 16 | s.source = { :git => 'https://github.com/caixindong/XDCaptureService.git', :tag => s.version.to_s } 17 | 18 | s.ios.deployment_target = '8.0' 19 | 20 | s.source_files = 'XDCaptureService/Classes/**/*' 21 | 22 | s.public_header_files = 'XDCaptureService/Classes/XDCaptureService.h' 23 | 24 | s.frameworks = 'AVFoundation', 'CoreImage' 25 | end 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 458770054@qq.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## XDCaptureService 5 | 6 | Copyright (c) 2018 458770054@qq.com 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/XDCaptureService/XDCaptureService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSCameraUsageDescription 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Example/XDCaptureService/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 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/XDCaptureService/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Example/XDCaptureService/XDAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // XDAppDelegate.m 3 | // XDCaptureService 4 | // 5 | // Created by 458770054@qq.com on 01/29/2018. 6 | // Copyright (c) 2018 458770054@qq.com. All rights reserved. 7 | // 8 | 9 | #import "XDAppDelegate.h" 10 | 11 | @implementation XDAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | 17 | return YES; 18 | } 19 | 20 | - (void)applicationWillResignActive:(UIApplication *)application 21 | { 22 | // 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. 23 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 24 | } 25 | 26 | - (void)applicationDidEnterBackground:(UIApplication *)application 27 | { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | - (void)applicationWillEnterForeground:(UIApplication *)application 33 | { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application 38 | { 39 | // 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. 40 | } 41 | 42 | - (void)applicationWillTerminate:(UIApplication *)application 43 | { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2018 458770054@qq.com <danecai@webank.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | XDCaptureService 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XDCaptureService 2 | 3 | [![CI Status](http://img.shields.io/travis/458770054@qq.com/XDCaptureService.svg?style=flat)](https://travis-ci.org/458770054@qq.com/XDCaptureService) 4 | [![Version](https://img.shields.io/cocoapods/v/XDCaptureService.svg?style=flat)](http://cocoapods.org/pods/XDCaptureService) 5 | [![License](https://img.shields.io/cocoapods/l/XDCaptureService.svg?style=flat)](http://cocoapods.org/pods/XDCaptureService) 6 | [![Platform](https://img.shields.io/cocoapods/p/XDCaptureService.svg?style=flat)](http://cocoapods.org/pods/XDCaptureService) 7 | A simple and stable camera component in iOS, which can help quickly build your own audio and video module. 8 | ## Example 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Installation 13 | 14 | XDCaptureService is available through [CocoaPods](http://cocoapods.org). To install 15 | it, simply add the following line to your Podfile: 16 | 17 | ```ruby 18 | pod 'XDCaptureService' 19 | ``` 20 | 21 | ## Usage 22 | #### Start service 23 | ``` 24 | @property (nonatomic, strong) XDCaptureService *service; 25 | self.service = [[XDCaptureService alloc] init]; 26 | _service.delegate = self; 27 | 28 | [_service startRunning]; 29 | ``` 30 | #### Delegate implement 31 | ``` 32 | @protocol XDCaptureServiceDelegate 33 | 34 | @optional 35 | //service lifecylce 36 | - (void)captureServiceDidStartService:(XDCaptureService *)service; 37 | 38 | - (void)captureService:(XDCaptureService *)service serviceDidFailWithError:(NSError *)error; 39 | 40 | - (void)captureServiceDidStopService:(XDCaptureService *)service; 41 | 42 | - (void)captureService:(XDCaptureService *)service getPreviewLayer:(AVCaptureVideoPreviewLayer *)previewLayer; 43 | 44 | - (void)captureService:(XDCaptureService *)service outputSampleBuffer:(CMSampleBufferRef)sampleBuffer; 45 | 46 | //record module 47 | - (void)captureServiceRecorderDidStart:(XDCaptureService *)service ; 48 | 49 | - (void)captureService:(XDCaptureService *)service recorderDidFailWithError:(NSError *)error; 50 | 51 | - (void)captureServiceRecorderDidStop:(XDCaptureService *)service; 52 | 53 | //photo capture 54 | - (void)captureService:(XDCaptureService *)service capturePhoto:(UIImage *)photo; 55 | 56 | //face detect 57 | - (void)captureService:(XDCaptureService *)service outputFaceDetectData:(NSArray *) faces; 58 | 59 | //depth map 60 | - (void)captureService:(XDCaptureService *)service captureTrueDepth:(AVDepthData *)depthData API_AVAILABLE(ios(11.0)); 61 | 62 | @end 63 | ``` 64 | 65 | #### Base actions 66 | Capture a photo, record a video, face detect, capture depth map data, switch camera, focus, whiteBalance,ISO and so on. 67 | 68 | #### More details 69 | You can view more usage details in the demo project. 70 | 71 | ## Author 72 | 73 | 458770054@qq.com 74 | 75 | ## License 76 | 77 | XDCaptureService is available under the MIT license. See the LICENSE file for more info. 78 | -------------------------------------------------------------------------------- /Example/XDCaptureService/XDViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // XDViewController.m 3 | // XDCaptureService 4 | // 5 | // Created by 458770054@qq.com on 01/29/2018. 6 | // Copyright (c) 2018 458770054@qq.com. All rights reserved. 7 | // 8 | 9 | #import "XDViewController.h" 10 | #import "XDCaptureService.h" 11 | #import 12 | 13 | @interface XDViewController () 14 | @property (weak, nonatomic) IBOutlet UIView *contentView; 15 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 16 | @property (weak, nonatomic) IBOutlet UILabel *label; 17 | @property (weak, nonatomic) IBOutlet UILabel *recordstate; 18 | @property (nonatomic, strong) XDCaptureService *service; 19 | @end 20 | 21 | @implementation XDViewController 22 | 23 | - (void)viewDidLoad 24 | { 25 | [super viewDidLoad]; 26 | _service = [[XDCaptureService alloc] init]; 27 | _service.delegate = self; 28 | 29 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_showDetail)]; 30 | _imageView.userInteractionEnabled = YES; 31 | [_imageView addGestureRecognizer:tap]; 32 | } 33 | 34 | - (void)_showDetail { 35 | if ([_label.text isEqualToString:@"Photo"]) { 36 | 37 | } else if ([_label.text isEqualToString:@"Video"]) { 38 | AVPlayerViewController *avVC = [[AVPlayerViewController alloc] init]; 39 | avVC.player = [AVPlayer playerWithURL:_service.recordURL]; 40 | avVC.videoGravity = AVLayerVideoGravityResizeAspect; 41 | [avVC.player play]; 42 | avVC.title = @"XDCaptureService Demo"; 43 | [self.navigationController pushViewController:avVC animated:YES]; 44 | } 45 | } 46 | 47 | - (void)viewWillAppear:(BOOL)animated { 48 | [super viewWillAppear:animated]; 49 | [_service startRunning]; 50 | } 51 | 52 | - (void)viewWillDisappear:(BOOL)animated { 53 | } 54 | 55 | - (void)didReceiveMemoryWarning 56 | { 57 | [super didReceiveMemoryWarning]; 58 | } 59 | 60 | - (IBAction)switchCamera:(id)sender { 61 | [_service switchCamera]; 62 | } 63 | 64 | - (IBAction)startRecord:(id)sender { 65 | [_service startRecording]; 66 | _recordstate.hidden = NO; 67 | } 68 | 69 | - (IBAction)stopRecord:(id)sender { 70 | _recordstate.hidden = YES; 71 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"停止录像" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; 72 | [alert show]; 73 | [_service stopRecording]; 74 | } 75 | - (IBAction)takePhoto:(id)sender { 76 | [_service capturePhoto]; 77 | } 78 | 79 | //service生命周期 80 | - (void)captureServiceDidStartService:(XDCaptureService *)service { 81 | NSLog(@"captureServiceDidStartService"); 82 | } 83 | 84 | - (void)captureService:(XDCaptureService *)service serviceDidFailWithError:(NSError *)error { 85 | NSLog(@"serviceDidFailWithError:%@",error.localizedDescription); 86 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:error.localizedDescription message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; 87 | [alert show]; 88 | } 89 | 90 | - (void)captureServiceDidStopService:(XDCaptureService *)service { 91 | NSLog(@"captureServiceDidStopService"); 92 | } 93 | 94 | - (void)captureService:(XDCaptureService *)service getPreviewLayer:(AVCaptureVideoPreviewLayer *)previewLayer { 95 | if (previewLayer) { 96 | dispatch_async(dispatch_get_main_queue(), ^{ 97 | [_contentView.layer addSublayer:previewLayer]; 98 | previewLayer.frame = _contentView.bounds; 99 | }); 100 | } 101 | } 102 | 103 | - (void)captureService:(XDCaptureService *)service outputSampleBuffer:(CMSampleBufferRef)sampleBuffer { 104 | 105 | } 106 | 107 | //录像相关 108 | - (void)captureServiceRecorderDidStart:(XDCaptureService *)service { 109 | NSLog(@"captureServiceRecorderDidStart"); 110 | } 111 | 112 | - (void)captureService:(XDCaptureService *)service recorderDidFailWithError:(NSError *)error { 113 | NSLog(@"recorderDidFailWithError:%@",error.localizedDescription); 114 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:error.localizedDescription message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; 115 | [alert show]; 116 | } 117 | 118 | - (void)captureServiceRecorderDidStop:(XDCaptureService *)service { 119 | AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:service.recordURL options:nil]; 120 | AVAssetImageGenerator *assetGen = [[AVAssetImageGenerator alloc] initWithAsset:asset]; 121 | assetGen.appliesPreferredTrackTransform = YES; 122 | CMTime time = CMTimeMakeWithSeconds(0.0, 600); 123 | CMTime actualTime; 124 | CGImageRef img = [assetGen copyCGImageAtTime:time actualTime:&actualTime error:nil]; 125 | UIImage *image = [[UIImage alloc] initWithCGImage:img]; 126 | CGImageRelease(img); 127 | dispatch_async(dispatch_get_main_queue(), ^{ 128 | _imageView.image = image; 129 | _label.text = @"Video"; 130 | }); 131 | } 132 | 133 | //照片捕获 134 | - (void)captureService:(XDCaptureService *)service capturePhoto:(UIImage *)photo { 135 | dispatch_async(dispatch_get_main_queue(), ^{ 136 | _imageView.image = photo; 137 | _label.text = @"Photo"; 138 | }); 139 | } 140 | @end 141 | -------------------------------------------------------------------------------- /XDCaptureService/Classes/XDCaptureService.h: -------------------------------------------------------------------------------- 1 | // 2 | // XDCaptureService.h 3 | // XDCaptureService 4 | // 5 | // Created by 蔡欣东 on 2018/2/26. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @class XDCaptureService; 12 | 13 | 14 | @protocol XDCaptureServiceDelegate 15 | 16 | @optional 17 | //service生命周期 18 | - (void)captureServiceDidStartService:(XDCaptureService *)service; 19 | 20 | - (void)captureService:(XDCaptureService *)service serviceDidFailWithError:(NSError *)error; 21 | 22 | - (void)captureServiceDidStopService:(XDCaptureService *)service; 23 | 24 | - (void)captureService:(XDCaptureService *)service getPreviewLayer:(AVCaptureVideoPreviewLayer *)previewLayer; 25 | 26 | - (void)captureService:(XDCaptureService *)service outputSampleBuffer:(CMSampleBufferRef)sampleBuffer; 27 | 28 | //录像相关 29 | - (void)captureServiceRecorderDidStart:(XDCaptureService *)service ; 30 | 31 | - (void)captureService:(XDCaptureService *)service recorderDidFailWithError:(NSError *)error; 32 | 33 | - (void)captureServiceRecorderDidCancel:(XDCaptureService *)service; 34 | 35 | - (void)captureServiceRecorderDidStop:(XDCaptureService *)service; 36 | 37 | //照片捕获 38 | - (void)captureService:(XDCaptureService *)service capturePhoto:(UIImage *)photo; 39 | 40 | //人脸检测 41 | - (void)captureService:(XDCaptureService *)service outputFaceDetectData:(NSArray *) faces; 42 | 43 | //景深数据 44 | - (void)captureService:(XDCaptureService *)service captureTrueDepth:(AVDepthData *)depthData API_AVAILABLE(ios(11.0)); 45 | 46 | @end 47 | 48 | @protocol XDCaptureServicePreViewSource 49 | 50 | - (AVCaptureVideoPreviewLayer *)preViewLayerSource; 51 | 52 | @end 53 | 54 | @interface XDCaptureService : NSObject 55 | 56 | //是否录制音频,默认是NO 57 | @property (nonatomic, assign) BOOL shouldRecordAudio; 58 | 59 | //iOS原生人脸检测,默认是NO 60 | @property (nonatomic, assign) BOOL openNativeFaceDetect; 61 | 62 | //摄像头的方向,默认是AVCaptureDevicePositionFront(前置) 63 | @property (nonatomic, assign) AVCaptureDevicePosition devicePosition; 64 | 65 | //判断是否支持景深模式,当前只支持7p、8p、X的后置摄像头及X的前后摄像头,系统要求是iOS 11以上 66 | @property (nonatomic, assign, readonly) BOOL depthSupported; 67 | 68 | //是否开启景深模式,默认是NO 69 | @property (nonatomic, assign) BOOL openDepth; 70 | 71 | //只有以下指定的sessionPreset才有depth数据:AVCaptureSessionPresetPhoto、AVCaptureSessionPreset1280x720、AVCaptureSessionPreset640x480 72 | @property (nonatomic, assign) AVCaptureSessionPreset sessionPreset; 73 | 74 | //帧率,默认是30 75 | @property (nonatomic, assign) int frameRate; 76 | 77 | //录像的临时存储地址,建议每次录完视频做下重定向 78 | @property (nonatomic, strong, readonly) NSURL *recordURL; 79 | 80 | //如果设置preViewSource则内部不生成AVCaptureVideoPreviewLayer 81 | @property (nonatomic, assign) id preViewSource; 82 | 83 | @property (nonatomic, assign) id delegate; 84 | 85 | @property (nonatomic, assign, readonly) BOOL isRunning; 86 | 87 | @property (nonatomic, assign, readonly) BOOL isRecording; 88 | 89 | 90 | /** 91 | 视频编码设置(影响录制的视频的编码和大小),默认是以下设置 92 | NSDictionary *compressionProperties = @{ 93 | AVVideoAverageBitRateKey : @(640 * 480 * 2.1), 94 | AVVideoExpectedSourceFrameRateKey : @(30), 95 | AVVideoMaxKeyFrameIntervalKey : @(30), 96 | AVVideoProfileLevelKey:AVVideoProfileLevelH264Main41, 97 | }; 98 | 99 | videoSetting = @{ 100 | AVVideoCodecKey: AVVideoCodecH264, 101 | AVVideoWidthKey: @(480), 102 | AVVideoHeightKey: @(640), 103 | AVVideoScalingModeKey: AVVideoScalingModeResizeAspect, 104 | AVVideoCompressionPropertiesKey: compressionProperties, 105 | }; 106 | **/ 107 | @property (nonatomic, strong) NSDictionary *videoSetting; 108 | 109 | ///相机专业设置,除非特定需求,一般不设置 110 | //感光度(iOS8以上) 111 | @property (nonatomic, assign, readonly) CGFloat deviceISO; 112 | @property (nonatomic, assign, readonly) CGFloat deviceMinISO; 113 | @property (nonatomic, assign, readonly) CGFloat deviceMaxISO; 114 | 115 | //镜头光圈大小 116 | @property (nonatomic, assign, readonly) CGFloat deviceAperture; 117 | 118 | //曝光 119 | @property (nonatomic, assign, readonly) BOOL supportsTapToExpose; 120 | @property (nonatomic, assign) AVCaptureExposureMode exposureMode; 121 | @property (nonatomic, assign) CGPoint exposurePoint; 122 | @property (nonatomic, assign, readonly) CMTime deviceExposureDuration; 123 | 124 | //聚焦 125 | @property (nonatomic, assign, readonly) BOOL supportsTapToFocus; 126 | @property (nonatomic, assign) AVCaptureFocusMode focusMode; 127 | @property (nonatomic, assign) CGPoint focusPoint; 128 | 129 | //白平衡 130 | @property (nonatomic, assign) AVCaptureWhiteBalanceMode whiteBalanceMode; 131 | 132 | //手电筒 133 | @property (nonatomic, assign, readonly) BOOL hasTorch; 134 | @property (nonatomic, assign) AVCaptureTorchMode torchMode; 135 | 136 | //闪光灯 137 | @property (nonatomic, assign, readonly) BOOL hasFlash; 138 | @property (nonatomic, assign) AVCaptureFlashMode flashMode; 139 | 140 | //相机权限判断 141 | + (BOOL)videoGranted; 142 | 143 | //麦克风权限判断 144 | + (BOOL)audioGranted; 145 | 146 | //切换摄像机 147 | - (void)switchCamera; 148 | 149 | //启动 150 | - (void)startRunning; 151 | 152 | //关闭 153 | - (void)stopRunning; 154 | 155 | //开始录像 156 | - (void)startRecording; 157 | 158 | //取消录像 159 | - (void)cancleRecording; 160 | 161 | //停止录像 162 | - (void)stopRecording; 163 | 164 | //拍照 165 | - (void)capturePhoto; 166 | 167 | @end 168 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then 7 | # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # resources to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 13 | 14 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 15 | > "$RESOURCES_TO_COPY" 16 | 17 | XCASSET_FILES=() 18 | 19 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 20 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 21 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 22 | 23 | case "${TARGETED_DEVICE_FAMILY:-}" in 24 | 1,2) 25 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 26 | ;; 27 | 1) 28 | TARGET_DEVICE_ARGS="--target-device iphone" 29 | ;; 30 | 2) 31 | TARGET_DEVICE_ARGS="--target-device ipad" 32 | ;; 33 | 3) 34 | TARGET_DEVICE_ARGS="--target-device tv" 35 | ;; 36 | 4) 37 | TARGET_DEVICE_ARGS="--target-device watch" 38 | ;; 39 | *) 40 | TARGET_DEVICE_ARGS="--target-device mac" 41 | ;; 42 | esac 43 | 44 | install_resource() 45 | { 46 | if [[ "$1" = /* ]] ; then 47 | RESOURCE_PATH="$1" 48 | else 49 | RESOURCE_PATH="${PODS_ROOT}/$1" 50 | fi 51 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 52 | cat << EOM 53 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 54 | EOM 55 | exit 1 56 | fi 57 | case $RESOURCE_PATH in 58 | *.storyboard) 59 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 60 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 61 | ;; 62 | *.xib) 63 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 64 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 65 | ;; 66 | *.framework) 67 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 68 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 69 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 70 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 71 | ;; 72 | *.xcdatamodel) 73 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 74 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 75 | ;; 76 | *.xcdatamodeld) 77 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 78 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 79 | ;; 80 | *.xcmappingmodel) 81 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 82 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 83 | ;; 84 | *.xcassets) 85 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 86 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 87 | ;; 88 | *) 89 | echo "$RESOURCE_PATH" || true 90 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 91 | ;; 92 | esac 93 | } 94 | 95 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 97 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 98 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 100 | fi 101 | rm -f "$RESOURCES_TO_COPY" 102 | 103 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] 104 | then 105 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 106 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 107 | while read line; do 108 | if [[ $line != "${PODS_ROOT}*" ]]; then 109 | XCASSET_FILES+=("$line") 110 | fi 111 | done <<<"$OTHER_XCASSETS" 112 | 113 | if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then 114 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 115 | else 116 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_BUILD_DIR}/assetcatalog_generated_info.plist" 117 | fi 118 | fi 119 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 145 | wait 146 | fi 147 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 7 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 8 | # frameworks to, so exit 0 (signalling the script phase was successful). 9 | exit 0 10 | fi 11 | 12 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 14 | 15 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 16 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 17 | 18 | # Used as a return value for each invocation of `strip_invalid_archs` function. 19 | STRIP_BINARY_RETVAL=0 20 | 21 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 22 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 23 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 24 | 25 | # Copies and strips a vendored framework 26 | install_framework() 27 | { 28 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 29 | local source="${BUILT_PRODUCTS_DIR}/$1" 30 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 31 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 32 | elif [ -r "$1" ]; then 33 | local source="$1" 34 | fi 35 | 36 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 37 | 38 | if [ -L "${source}" ]; then 39 | echo "Symlinked..." 40 | source="$(readlink "${source}")" 41 | fi 42 | 43 | # Use filter instead of exclude so missing patterns don't throw errors. 44 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 45 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 46 | 47 | local basename 48 | basename="$(basename -s .framework "$1")" 49 | binary="${destination}/${basename}.framework/${basename}" 50 | if ! [ -r "$binary" ]; then 51 | binary="${destination}/${basename}" 52 | fi 53 | 54 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 55 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 56 | strip_invalid_archs "$binary" 57 | fi 58 | 59 | # Resign the code if required by the build settings to avoid unstable apps 60 | code_sign_if_enabled "${destination}/$(basename "$1")" 61 | 62 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 63 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 64 | local swift_runtime_libs 65 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 66 | for lib in $swift_runtime_libs; do 67 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 68 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 69 | code_sign_if_enabled "${destination}/${lib}" 70 | done 71 | fi 72 | } 73 | 74 | # Copies and strips a vendored dSYM 75 | install_dsym() { 76 | local source="$1" 77 | if [ -r "$source" ]; then 78 | # Copy the dSYM into a the targets temp dir. 79 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 80 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 81 | 82 | local basename 83 | basename="$(basename -s .framework.dSYM "$source")" 84 | binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" 85 | 86 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 87 | if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then 88 | strip_invalid_archs "$binary" 89 | fi 90 | 91 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 92 | # Move the stripped file into its final destination. 93 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 94 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 95 | else 96 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 97 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" 98 | fi 99 | fi 100 | } 101 | 102 | # Signs a framework with the provided identity 103 | code_sign_if_enabled() { 104 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 105 | # Use the current code_sign_identitiy 106 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 107 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 108 | 109 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 110 | code_sign_cmd="$code_sign_cmd &" 111 | fi 112 | echo "$code_sign_cmd" 113 | eval "$code_sign_cmd" 114 | fi 115 | } 116 | 117 | # Strip invalid architectures 118 | strip_invalid_archs() { 119 | binary="$1" 120 | # Get architectures for current target binary 121 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 122 | # Intersect them with the architectures we are building for 123 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 124 | # If there are no archs supported by this binary then warn the user 125 | if [[ -z "$intersected_archs" ]]; then 126 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 127 | STRIP_BINARY_RETVAL=0 128 | return 129 | fi 130 | stripped="" 131 | for arch in $binary_archs; do 132 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 133 | # Strip non-valid architectures in-place 134 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 135 | stripped="$stripped $arch" 136 | fi 137 | done 138 | if [[ "$stripped" ]]; then 139 | echo "Stripped $binary of architectures:$stripped" 140 | fi 141 | STRIP_BINARY_RETVAL=1 142 | } 143 | 144 | 145 | if [[ "$CONFIGURATION" == "Debug" ]]; then 146 | install_framework "${BUILT_PRODUCTS_DIR}/XDCaptureService/XDCaptureService.framework" 147 | fi 148 | if [[ "$CONFIGURATION" == "Release" ]]; then 149 | install_framework "${BUILT_PRODUCTS_DIR}/XDCaptureService/XDCaptureService.framework" 150 | fi 151 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 152 | wait 153 | fi 154 | -------------------------------------------------------------------------------- /XDCaptureService/Classes/XDVideoWritter.m: -------------------------------------------------------------------------------- 1 | // 2 | // XDVideoWritter.m 3 | // XDCaptureService 4 | // 5 | // Created by 蔡欣东 on 2018/2/26. 6 | // 7 | 8 | #import "XDVideoWritter.h" 9 | 10 | @interface XDVideoWritter() 11 | 12 | @property (nonatomic, strong) AVAssetWriter *assetWriter; 13 | 14 | @property (nonatomic, strong) AVAssetWriterInput *videoInput; 15 | 16 | @property (nonatomic, strong) AVAssetWriterInput *audioInput; 17 | 18 | @property (nonatomic, strong) NSDictionary *videoSetting; 19 | 20 | @property (nonatomic, strong) NSDictionary *audioSetting; 21 | 22 | @property (nonatomic, strong) dispatch_queue_t dispatchQueue; 23 | 24 | @property (nonatomic, strong) NSURL *outputURL; 25 | 26 | @property (nonatomic, assign) BOOL isWriting; 27 | 28 | @property (nonatomic, assign) BOOL firstSample; 29 | 30 | @end 31 | 32 | @implementation XDVideoWritter 33 | 34 | - (instancetype)initWithURL:(NSURL *)URL VideoSettings:(NSDictionary *)videoSetting audioSetting:(NSDictionary *)audioSetting { 35 | if (self = [super init]) { 36 | _outputURL = URL; 37 | _videoSetting = videoSetting; 38 | _audioSetting = audioSetting; 39 | _firstSample = YES; 40 | _isWriting = NO; 41 | } 42 | return self; 43 | } 44 | 45 | - (void)dealloc { 46 | NSLog(@"===========XDVideoWritter dealloc==========="); 47 | [[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureSessionWasInterruptedNotification object:nil]; 48 | } 49 | 50 | - (void)startWriting { 51 | if (_assetWriter) { 52 | _assetWriter = nil; 53 | } 54 | NSError *error = nil; 55 | 56 | NSString *fileType = AVFileTypeMPEG4; 57 | _assetWriter = [[AVAssetWriter alloc] initWithURL:_outputURL fileType:fileType error:&error]; 58 | 59 | if (!_assetWriter || error) { 60 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:didFailWithError:)]){ 61 | [self.delegate videoWritter:self didFailWithError:error]; 62 | } 63 | } 64 | 65 | if (_videoSetting) { 66 | _videoInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeVideo outputSettings:_videoSetting]; 67 | 68 | _videoInput.expectsMediaDataInRealTime = YES; 69 | 70 | if ([_assetWriter canAddInput:_videoInput]) { 71 | [_assetWriter addInput:_videoInput]; 72 | } else { 73 | NSError *error = [NSError errorWithDomain:@"com.caixindong.captureservice.writter" code:-2210 userInfo:@{NSLocalizedDescriptionKey:@"VideoWritter unable to add video input"}]; 74 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:didFailWithError:)]) { 75 | [self.delegate videoWritter:self didFailWithError:error]; 76 | } 77 | return; 78 | } 79 | } else { 80 | NSLog(@"warning: no video setting"); 81 | } 82 | 83 | if (_audioSetting) { 84 | _audioInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:_audioSetting]; 85 | 86 | _audioInput.expectsMediaDataInRealTime = YES; 87 | 88 | if ([_assetWriter canAddInput:_audioInput]) { 89 | [_assetWriter addInput:_audioInput]; 90 | } else { 91 | NSError *error = [NSError errorWithDomain:@"com.caixindong.captureservice.writter" code:-2211 userInfo:@{NSLocalizedDescriptionKey:@"VideoWritter unable to add audio input"}]; 92 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:didFailWithError:)]) { 93 | [self.delegate videoWritter:self didFailWithError:error]; 94 | } 95 | return; 96 | } 97 | } else { 98 | NSLog(@"warning: no audio setting"); 99 | } 100 | 101 | if ([_assetWriter startWriting]) { 102 | self.isWriting = YES; 103 | } else { 104 | NSError *error = [NSError errorWithDomain:@"com.xindong.captureservice.writter" code:-2212 userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat: @"VideoWritter startWriting fail error: %@",_assetWriter.error.localizedDescription]}]; 105 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:didFailWithError:)]) { 106 | [self.delegate videoWritter:self didFailWithError:error]; 107 | } 108 | } 109 | 110 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_assetWritterInterruptedNotification:) name:AVCaptureSessionWasInterruptedNotification object:nil]; 111 | } 112 | 113 | - (void)_assetWritterInterruptedNotification:(NSNotification *)notification { 114 | NSLog(@"assetWritterInterruptedNotification"); 115 | [self cancleWriting]; 116 | } 117 | 118 | - (void)cancleWriting { 119 | if (_assetWriter.status == AVAssetWriterStatusWriting && _isWriting == YES) { 120 | [_assetWriter cancelWriting]; 121 | self.isWriting = NO; 122 | } else { 123 | NSLog(@"warning : cancle writing with unsuitable state : %ld",(long)_assetWriter.status); 124 | } 125 | [[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureSessionWasInterruptedNotification object:nil]; 126 | } 127 | 128 | - (void)stopWritingAsyn { 129 | if (_assetWriter.status == AVAssetWriterStatusWriting && _isWriting == YES) { 130 | self.isWriting = NO; 131 | [_assetWriter finishWritingWithCompletionHandler:^{ 132 | if (_assetWriter.status == AVAssetWriterStatusCompleted) { 133 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:completeWriting:)]) { 134 | [self.delegate videoWritter:self completeWriting:nil]; 135 | } 136 | } else { 137 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:completeWriting:)]) { 138 | [self.delegate videoWritter:self completeWriting:_assetWriter.error]; 139 | } 140 | } 141 | }]; 142 | } else { 143 | NSLog(@"warning : stop writing with unsuitable state : %ld",(long)_assetWriter.status); 144 | } 145 | [[NSNotificationCenter defaultCenter] removeObserver:self name:AVCaptureSessionWasInterruptedNotification object:nil]; 146 | } 147 | 148 | - (void)appendSampleBuffer:(CMSampleBufferRef)sampleBuffer { 149 | if (!_isWriting) { 150 | NSLog(@"VideoWritter has been finish"); 151 | return; 152 | } 153 | 154 | CMFormatDescriptionRef formatDesc = CMSampleBufferGetFormatDescription(sampleBuffer); 155 | 156 | CMMediaType mediaType = CMFormatDescriptionGetMediaType(formatDesc); 157 | 158 | if (mediaType == kCMMediaType_Video) { 159 | CMTime timestamp = CMSampleBufferGetPresentationTimeStamp(sampleBuffer); 160 | 161 | if (self.firstSample) { 162 | [_assetWriter startSessionAtSourceTime:timestamp]; 163 | self.firstSample = NO; 164 | } 165 | 166 | if (_videoInput.readyForMoreMediaData) { 167 | if (![_videoInput appendSampleBuffer:sampleBuffer]) { 168 | NSError *error = [NSError errorWithDomain:@"com.caixindong.captureservice.writter" code:-2213 userInfo:@{NSLocalizedDescriptionKey:[NSString stringWithFormat: @"VideoWritter appending video sample buffer fail error:%@",_assetWriter.error.localizedDescription]}]; 169 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:didFailWithError:)]) { 170 | [self.delegate videoWritter:self didFailWithError:error]; 171 | } 172 | } 173 | } 174 | } else if (!self.firstSample && mediaType == kCMMediaType_Audio) { 175 | if (_audioInput.readyForMoreMediaData) { 176 | if (![_audioInput appendSampleBuffer:sampleBuffer]) { 177 | NSError *error = [NSError errorWithDomain:@"com.caixindong.captureservice.writter" code:-2214 userInfo:@{NSLocalizedDescriptionKey:[NSString stringWithFormat:@"VideoWritter appending audio sample buffer fail error: %@",_assetWriter.error]}]; 178 | if (self.delegate && [self.delegate respondsToSelector:@selector(videoWritter:didFailWithError:)]) { 179 | [self.delegate videoWritter:self didFailWithError:error]; 180 | } 181 | } 182 | } 183 | } 184 | } 185 | 186 | @end 187 | -------------------------------------------------------------------------------- /Example/XDCaptureService/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 | 28 | 29 | 30 | 31 | 32 | 38 | 49 | 60 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 89 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /Example/XDCaptureService.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 145A0EF42402C93176E9DC1E /* Pods_XDCaptureService_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 87D90CBDC148468D1DABD47C /* Pods_XDCaptureService_Tests.framework */; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* XDAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* XDAppDelegate.m */; }; 17 | 6003F5A7195388D20070C39A /* XDViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* XDViewController.m */; }; 18 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 19 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 20 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 21 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 22 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 24 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; 25 | 7C9CCE0C1409782D8017A2CC /* Pods_XDCaptureService_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F5F1D595C15A6987C4B541 /* Pods_XDCaptureService_Example.framework */; }; 26 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 6003F582195388D10070C39A /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 6003F589195388D20070C39A; 35 | remoteInfo = XDCaptureService; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 08C58D4BF7DCF4E835283EBE /* Pods-XDCaptureService_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XDCaptureService_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example.release.xcconfig"; sourceTree = ""; }; 41 | 343715C3D30FCEDFC603F0E2 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 42 | 43F96019725D031BEDAD884F /* Pods-XDCaptureService_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XDCaptureService_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example.debug.xcconfig"; sourceTree = ""; }; 43 | 50F5F1D595C15A6987C4B541 /* Pods_XDCaptureService_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_XDCaptureService_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 6003F58A195388D20070C39A /* XDCaptureService_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XDCaptureService_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 46 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 47 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 48 | 6003F595195388D20070C39A /* XDCaptureService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "XDCaptureService-Info.plist"; sourceTree = ""; }; 49 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 50 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | 6003F59B195388D20070C39A /* XDCaptureService-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "XDCaptureService-Prefix.pch"; sourceTree = ""; }; 52 | 6003F59C195388D20070C39A /* XDAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XDAppDelegate.h; sourceTree = ""; }; 53 | 6003F59D195388D20070C39A /* XDAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XDAppDelegate.m; sourceTree = ""; }; 54 | 6003F5A5195388D20070C39A /* XDViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XDViewController.h; sourceTree = ""; }; 55 | 6003F5A6195388D20070C39A /* XDViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XDViewController.m; sourceTree = ""; }; 56 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 57 | 6003F5AE195388D20070C39A /* XDCaptureService_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XDCaptureService_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 59 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 60 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 61 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 62 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 63 | 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 64 | 7DCAADD62DA36E0AB7EBF825 /* Pods-XDCaptureService_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XDCaptureService_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests.debug.xcconfig"; sourceTree = ""; }; 65 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 66 | 87D90CBDC148468D1DABD47C /* Pods_XDCaptureService_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_XDCaptureService_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | 8ED99F45EACEDEF10F38FA55 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 68 | A151A1F49239B8A0315BE979 /* XDCaptureService.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = XDCaptureService.podspec; path = ../XDCaptureService.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 69 | D543305000AB32720D1CCF90 /* Pods-XDCaptureService_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-XDCaptureService_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests.release.xcconfig"; sourceTree = ""; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | 6003F587195388D20070C39A /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 78 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 79 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 80 | 7C9CCE0C1409782D8017A2CC /* Pods_XDCaptureService_Example.framework in Frameworks */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | 6003F5AB195388D20070C39A /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 89 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 90 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 91 | 145A0EF42402C93176E9DC1E /* Pods_XDCaptureService_Tests.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 6003F581195388D10070C39A = { 99 | isa = PBXGroup; 100 | children = ( 101 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 102 | 6003F593195388D20070C39A /* Example for XDCaptureService */, 103 | 6003F5B5195388D20070C39A /* Tests */, 104 | 6003F58C195388D20070C39A /* Frameworks */, 105 | 6003F58B195388D20070C39A /* Products */, 106 | AEDC62CDDEB21D4984B29E70 /* Pods */, 107 | ); 108 | sourceTree = ""; 109 | }; 110 | 6003F58B195388D20070C39A /* Products */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 6003F58A195388D20070C39A /* XDCaptureService_Example.app */, 114 | 6003F5AE195388D20070C39A /* XDCaptureService_Tests.xctest */, 115 | ); 116 | name = Products; 117 | sourceTree = ""; 118 | }; 119 | 6003F58C195388D20070C39A /* Frameworks */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 6003F58D195388D20070C39A /* Foundation.framework */, 123 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 124 | 6003F591195388D20070C39A /* UIKit.framework */, 125 | 6003F5AF195388D20070C39A /* XCTest.framework */, 126 | 50F5F1D595C15A6987C4B541 /* Pods_XDCaptureService_Example.framework */, 127 | 87D90CBDC148468D1DABD47C /* Pods_XDCaptureService_Tests.framework */, 128 | ); 129 | name = Frameworks; 130 | sourceTree = ""; 131 | }; 132 | 6003F593195388D20070C39A /* Example for XDCaptureService */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 6003F59C195388D20070C39A /* XDAppDelegate.h */, 136 | 6003F59D195388D20070C39A /* XDAppDelegate.m */, 137 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 138 | 6003F5A5195388D20070C39A /* XDViewController.h */, 139 | 6003F5A6195388D20070C39A /* XDViewController.m */, 140 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, 141 | 6003F5A8195388D20070C39A /* Images.xcassets */, 142 | 6003F594195388D20070C39A /* Supporting Files */, 143 | ); 144 | name = "Example for XDCaptureService"; 145 | path = XDCaptureService; 146 | sourceTree = ""; 147 | }; 148 | 6003F594195388D20070C39A /* Supporting Files */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 6003F595195388D20070C39A /* XDCaptureService-Info.plist */, 152 | 6003F596195388D20070C39A /* InfoPlist.strings */, 153 | 6003F599195388D20070C39A /* main.m */, 154 | 6003F59B195388D20070C39A /* XDCaptureService-Prefix.pch */, 155 | ); 156 | name = "Supporting Files"; 157 | sourceTree = ""; 158 | }; 159 | 6003F5B5195388D20070C39A /* Tests */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 6003F5BB195388D20070C39A /* Tests.m */, 163 | 6003F5B6195388D20070C39A /* Supporting Files */, 164 | ); 165 | path = Tests; 166 | sourceTree = ""; 167 | }; 168 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 172 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 173 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 174 | ); 175 | name = "Supporting Files"; 176 | sourceTree = ""; 177 | }; 178 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | A151A1F49239B8A0315BE979 /* XDCaptureService.podspec */, 182 | 8ED99F45EACEDEF10F38FA55 /* README.md */, 183 | 343715C3D30FCEDFC603F0E2 /* LICENSE */, 184 | ); 185 | name = "Podspec Metadata"; 186 | sourceTree = ""; 187 | }; 188 | AEDC62CDDEB21D4984B29E70 /* Pods */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 43F96019725D031BEDAD884F /* Pods-XDCaptureService_Example.debug.xcconfig */, 192 | 08C58D4BF7DCF4E835283EBE /* Pods-XDCaptureService_Example.release.xcconfig */, 193 | 7DCAADD62DA36E0AB7EBF825 /* Pods-XDCaptureService_Tests.debug.xcconfig */, 194 | D543305000AB32720D1CCF90 /* Pods-XDCaptureService_Tests.release.xcconfig */, 195 | ); 196 | name = Pods; 197 | sourceTree = ""; 198 | }; 199 | /* End PBXGroup section */ 200 | 201 | /* Begin PBXNativeTarget section */ 202 | 6003F589195388D20070C39A /* XDCaptureService_Example */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "XDCaptureService_Example" */; 205 | buildPhases = ( 206 | 8D7E96522CC31E3624F8466A /* [CP] Check Pods Manifest.lock */, 207 | 6003F586195388D20070C39A /* Sources */, 208 | 6003F587195388D20070C39A /* Frameworks */, 209 | 6003F588195388D20070C39A /* Resources */, 210 | D0AE49425037EF181B99A4E4 /* [CP] Embed Pods Frameworks */, 211 | ); 212 | buildRules = ( 213 | ); 214 | dependencies = ( 215 | ); 216 | name = XDCaptureService_Example; 217 | productName = XDCaptureService; 218 | productReference = 6003F58A195388D20070C39A /* XDCaptureService_Example.app */; 219 | productType = "com.apple.product-type.application"; 220 | }; 221 | 6003F5AD195388D20070C39A /* XDCaptureService_Tests */ = { 222 | isa = PBXNativeTarget; 223 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "XDCaptureService_Tests" */; 224 | buildPhases = ( 225 | C66E98ED48702FA9F630C463 /* [CP] Check Pods Manifest.lock */, 226 | 6003F5AA195388D20070C39A /* Sources */, 227 | 6003F5AB195388D20070C39A /* Frameworks */, 228 | 6003F5AC195388D20070C39A /* Resources */, 229 | ); 230 | buildRules = ( 231 | ); 232 | dependencies = ( 233 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 234 | ); 235 | name = XDCaptureService_Tests; 236 | productName = XDCaptureServiceTests; 237 | productReference = 6003F5AE195388D20070C39A /* XDCaptureService_Tests.xctest */; 238 | productType = "com.apple.product-type.bundle.unit-test"; 239 | }; 240 | /* End PBXNativeTarget section */ 241 | 242 | /* Begin PBXProject section */ 243 | 6003F582195388D10070C39A /* Project object */ = { 244 | isa = PBXProject; 245 | attributes = { 246 | CLASSPREFIX = XD; 247 | LastUpgradeCheck = 0720; 248 | ORGANIZATIONNAME = "458770054@qq.com"; 249 | TargetAttributes = { 250 | 6003F589195388D20070C39A = { 251 | DevelopmentTeam = Z2975MRPKS; 252 | ProvisioningStyle = Automatic; 253 | }; 254 | 6003F5AD195388D20070C39A = { 255 | TestTargetID = 6003F589195388D20070C39A; 256 | }; 257 | }; 258 | }; 259 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "XDCaptureService" */; 260 | compatibilityVersion = "Xcode 3.2"; 261 | developmentRegion = English; 262 | hasScannedForEncodings = 0; 263 | knownRegions = ( 264 | en, 265 | Base, 266 | ); 267 | mainGroup = 6003F581195388D10070C39A; 268 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 269 | projectDirPath = ""; 270 | projectRoot = ""; 271 | targets = ( 272 | 6003F589195388D20070C39A /* XDCaptureService_Example */, 273 | 6003F5AD195388D20070C39A /* XDCaptureService_Tests */, 274 | ); 275 | }; 276 | /* End PBXProject section */ 277 | 278 | /* Begin PBXResourcesBuildPhase section */ 279 | 6003F588195388D20070C39A /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 284 | 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, 285 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 286 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 6003F5AC195388D20070C39A /* Resources */ = { 291 | isa = PBXResourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXResourcesBuildPhase section */ 299 | 300 | /* Begin PBXShellScriptBuildPhase section */ 301 | 8D7E96522CC31E3624F8466A /* [CP] Check Pods Manifest.lock */ = { 302 | isa = PBXShellScriptBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | ); 306 | inputPaths = ( 307 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 308 | "${PODS_ROOT}/Manifest.lock", 309 | ); 310 | name = "[CP] Check Pods Manifest.lock"; 311 | outputPaths = ( 312 | "$(DERIVED_FILE_DIR)/Pods-XDCaptureService_Example-checkManifestLockResult.txt", 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | shellPath = /bin/sh; 316 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 317 | showEnvVarsInLog = 0; 318 | }; 319 | C66E98ED48702FA9F630C463 /* [CP] Check Pods Manifest.lock */ = { 320 | isa = PBXShellScriptBuildPhase; 321 | buildActionMask = 2147483647; 322 | files = ( 323 | ); 324 | inputPaths = ( 325 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 326 | "${PODS_ROOT}/Manifest.lock", 327 | ); 328 | name = "[CP] Check Pods Manifest.lock"; 329 | outputPaths = ( 330 | "$(DERIVED_FILE_DIR)/Pods-XDCaptureService_Tests-checkManifestLockResult.txt", 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | shellPath = /bin/sh; 334 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 335 | showEnvVarsInLog = 0; 336 | }; 337 | D0AE49425037EF181B99A4E4 /* [CP] Embed Pods Frameworks */ = { 338 | isa = PBXShellScriptBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | ); 342 | inputPaths = ( 343 | "${SRCROOT}/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-frameworks.sh", 344 | "${BUILT_PRODUCTS_DIR}/XDCaptureService/XDCaptureService.framework", 345 | ); 346 | name = "[CP] Embed Pods Frameworks"; 347 | outputPaths = ( 348 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/XDCaptureService.framework", 349 | ); 350 | runOnlyForDeploymentPostprocessing = 0; 351 | shellPath = /bin/sh; 352 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example-frameworks.sh\"\n"; 353 | showEnvVarsInLog = 0; 354 | }; 355 | /* End PBXShellScriptBuildPhase section */ 356 | 357 | /* Begin PBXSourcesBuildPhase section */ 358 | 6003F586195388D20070C39A /* Sources */ = { 359 | isa = PBXSourcesBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | 6003F59E195388D20070C39A /* XDAppDelegate.m in Sources */, 363 | 6003F5A7195388D20070C39A /* XDViewController.m in Sources */, 364 | 6003F59A195388D20070C39A /* main.m in Sources */, 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | }; 368 | 6003F5AA195388D20070C39A /* Sources */ = { 369 | isa = PBXSourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | }; 376 | /* End PBXSourcesBuildPhase section */ 377 | 378 | /* Begin PBXTargetDependency section */ 379 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 380 | isa = PBXTargetDependency; 381 | target = 6003F589195388D20070C39A /* XDCaptureService_Example */; 382 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 383 | }; 384 | /* End PBXTargetDependency section */ 385 | 386 | /* Begin PBXVariantGroup section */ 387 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 388 | isa = PBXVariantGroup; 389 | children = ( 390 | 6003F597195388D20070C39A /* en */, 391 | ); 392 | name = InfoPlist.strings; 393 | sourceTree = ""; 394 | }; 395 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 396 | isa = PBXVariantGroup; 397 | children = ( 398 | 6003F5B9195388D20070C39A /* en */, 399 | ); 400 | name = InfoPlist.strings; 401 | sourceTree = ""; 402 | }; 403 | 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { 404 | isa = PBXVariantGroup; 405 | children = ( 406 | 71719F9E1E33DC2100824A3D /* Base */, 407 | ); 408 | name = LaunchScreen.storyboard; 409 | sourceTree = ""; 410 | }; 411 | /* End PBXVariantGroup section */ 412 | 413 | /* Begin XCBuildConfiguration section */ 414 | 6003F5BD195388D20070C39A /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | ALWAYS_SEARCH_USER_PATHS = NO; 418 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 419 | CLANG_CXX_LIBRARY = "libc++"; 420 | CLANG_ENABLE_MODULES = YES; 421 | CLANG_ENABLE_OBJC_ARC = YES; 422 | CLANG_WARN_BOOL_CONVERSION = YES; 423 | CLANG_WARN_CONSTANT_CONVERSION = YES; 424 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 425 | CLANG_WARN_EMPTY_BODY = YES; 426 | CLANG_WARN_ENUM_CONVERSION = YES; 427 | CLANG_WARN_INT_CONVERSION = YES; 428 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 431 | COPY_PHASE_STRIP = NO; 432 | ENABLE_TESTABILITY = YES; 433 | GCC_C_LANGUAGE_STANDARD = gnu99; 434 | GCC_DYNAMIC_NO_PIC = NO; 435 | GCC_OPTIMIZATION_LEVEL = 0; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "DEBUG=1", 438 | "$(inherited)", 439 | ); 440 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 441 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 442 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 443 | GCC_WARN_UNDECLARED_SELECTOR = YES; 444 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 445 | GCC_WARN_UNUSED_FUNCTION = YES; 446 | GCC_WARN_UNUSED_VARIABLE = YES; 447 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 448 | ONLY_ACTIVE_ARCH = YES; 449 | SDKROOT = iphoneos; 450 | TARGETED_DEVICE_FAMILY = "1,2"; 451 | }; 452 | name = Debug; 453 | }; 454 | 6003F5BE195388D20070C39A /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | buildSettings = { 457 | ALWAYS_SEARCH_USER_PATHS = NO; 458 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 459 | CLANG_CXX_LIBRARY = "libc++"; 460 | CLANG_ENABLE_MODULES = YES; 461 | CLANG_ENABLE_OBJC_ARC = YES; 462 | CLANG_WARN_BOOL_CONVERSION = YES; 463 | CLANG_WARN_CONSTANT_CONVERSION = YES; 464 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 465 | CLANG_WARN_EMPTY_BODY = YES; 466 | CLANG_WARN_ENUM_CONVERSION = YES; 467 | CLANG_WARN_INT_CONVERSION = YES; 468 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 469 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 471 | COPY_PHASE_STRIP = YES; 472 | ENABLE_NS_ASSERTIONS = NO; 473 | GCC_C_LANGUAGE_STANDARD = gnu99; 474 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 475 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 476 | GCC_WARN_UNDECLARED_SELECTOR = YES; 477 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 478 | GCC_WARN_UNUSED_FUNCTION = YES; 479 | GCC_WARN_UNUSED_VARIABLE = YES; 480 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 481 | SDKROOT = iphoneos; 482 | TARGETED_DEVICE_FAMILY = "1,2"; 483 | VALIDATE_PRODUCT = YES; 484 | }; 485 | name = Release; 486 | }; 487 | 6003F5C0195388D20070C39A /* Debug */ = { 488 | isa = XCBuildConfiguration; 489 | baseConfigurationReference = 43F96019725D031BEDAD884F /* Pods-XDCaptureService_Example.debug.xcconfig */; 490 | buildSettings = { 491 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 492 | CODE_SIGN_IDENTITY = "iPhone Developer"; 493 | CODE_SIGN_STYLE = Automatic; 494 | DEVELOPMENT_TEAM = Z2975MRPKS; 495 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 496 | GCC_PREFIX_HEADER = "XDCaptureService/XDCaptureService-Prefix.pch"; 497 | INFOPLIST_FILE = "XDCaptureService/XDCaptureService-Info.plist"; 498 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 499 | MODULE_NAME = ExampleApp; 500 | PRODUCT_BUNDLE_IDENTIFIER = "com.xindong.XDCapture-Example"; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | PROVISIONING_PROFILE_SPECIFIER = ""; 503 | WRAPPER_EXTENSION = app; 504 | }; 505 | name = Debug; 506 | }; 507 | 6003F5C1195388D20070C39A /* Release */ = { 508 | isa = XCBuildConfiguration; 509 | baseConfigurationReference = 08C58D4BF7DCF4E835283EBE /* Pods-XDCaptureService_Example.release.xcconfig */; 510 | buildSettings = { 511 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 512 | CODE_SIGN_IDENTITY = "iPhone Developer"; 513 | CODE_SIGN_STYLE = Automatic; 514 | DEVELOPMENT_TEAM = Z2975MRPKS; 515 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 516 | GCC_PREFIX_HEADER = "XDCaptureService/XDCaptureService-Prefix.pch"; 517 | INFOPLIST_FILE = "XDCaptureService/XDCaptureService-Info.plist"; 518 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 519 | MODULE_NAME = ExampleApp; 520 | PRODUCT_BUNDLE_IDENTIFIER = "com.xindong.XDCapture-Example"; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | PROVISIONING_PROFILE_SPECIFIER = ""; 523 | WRAPPER_EXTENSION = app; 524 | }; 525 | name = Release; 526 | }; 527 | 6003F5C3195388D20070C39A /* Debug */ = { 528 | isa = XCBuildConfiguration; 529 | baseConfigurationReference = 7DCAADD62DA36E0AB7EBF825 /* Pods-XDCaptureService_Tests.debug.xcconfig */; 530 | buildSettings = { 531 | BUNDLE_LOADER = "$(TEST_HOST)"; 532 | FRAMEWORK_SEARCH_PATHS = ( 533 | "$(SDKROOT)/Developer/Library/Frameworks", 534 | "$(inherited)", 535 | "$(DEVELOPER_FRAMEWORKS_DIR)", 536 | ); 537 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 538 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 539 | GCC_PREPROCESSOR_DEFINITIONS = ( 540 | "DEBUG=1", 541 | "$(inherited)", 542 | ); 543 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 544 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 545 | PRODUCT_NAME = "$(TARGET_NAME)"; 546 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XDCaptureService_Example.app/XDCaptureService_Example"; 547 | WRAPPER_EXTENSION = xctest; 548 | }; 549 | name = Debug; 550 | }; 551 | 6003F5C4195388D20070C39A /* Release */ = { 552 | isa = XCBuildConfiguration; 553 | baseConfigurationReference = D543305000AB32720D1CCF90 /* Pods-XDCaptureService_Tests.release.xcconfig */; 554 | buildSettings = { 555 | BUNDLE_LOADER = "$(TEST_HOST)"; 556 | FRAMEWORK_SEARCH_PATHS = ( 557 | "$(SDKROOT)/Developer/Library/Frameworks", 558 | "$(inherited)", 559 | "$(DEVELOPER_FRAMEWORKS_DIR)", 560 | ); 561 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 562 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 563 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 564 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; 565 | PRODUCT_NAME = "$(TARGET_NAME)"; 566 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/XDCaptureService_Example.app/XDCaptureService_Example"; 567 | WRAPPER_EXTENSION = xctest; 568 | }; 569 | name = Release; 570 | }; 571 | /* End XCBuildConfiguration section */ 572 | 573 | /* Begin XCConfigurationList section */ 574 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "XDCaptureService" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | 6003F5BD195388D20070C39A /* Debug */, 578 | 6003F5BE195388D20070C39A /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "XDCaptureService_Example" */ = { 584 | isa = XCConfigurationList; 585 | buildConfigurations = ( 586 | 6003F5C0195388D20070C39A /* Debug */, 587 | 6003F5C1195388D20070C39A /* Release */, 588 | ); 589 | defaultConfigurationIsVisible = 0; 590 | defaultConfigurationName = Release; 591 | }; 592 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "XDCaptureService_Tests" */ = { 593 | isa = XCConfigurationList; 594 | buildConfigurations = ( 595 | 6003F5C3195388D20070C39A /* Debug */, 596 | 6003F5C4195388D20070C39A /* Release */, 597 | ); 598 | defaultConfigurationIsVisible = 0; 599 | defaultConfigurationName = Release; 600 | }; 601 | /* End XCConfigurationList section */ 602 | }; 603 | rootObject = 6003F582195388D10070C39A /* Project object */; 604 | } 605 | -------------------------------------------------------------------------------- /XDCaptureService/Classes/XDCaptureService.m: -------------------------------------------------------------------------------- 1 | // 2 | // XDCaptureService.m 3 | // XDCaptureService 4 | // 5 | // Created by 蔡欣东 on 2018/2/26. 6 | // 7 | 8 | #import "XDCaptureService.h" 9 | #import "XDVideoWritter.h" 10 | #import 11 | #include 12 | 13 | static NSString *const XDCVIDEODIR = @"tmpVideo"; 14 | 15 | #define XDCAPTURE_ISIHPNEX [UIScreen mainScreen].bounds.size.height == 812? YES:NO 16 | 17 | @interface XDCaptureService(){ 18 | BOOL _firstStartRunning; 19 | BOOL _startSessionOnEnteringForeground; 20 | NSString *_videoDir; 21 | } 22 | 23 | @property (nonatomic, strong) AVCaptureSession *captureSession; 24 | 25 | @property (nonatomic, strong) dispatch_queue_t sessionQueue; 26 | 27 | @property (nonatomic, strong) dispatch_queue_t writtingQueue; 28 | 29 | @property (nonatomic, strong) dispatch_queue_t outputQueue; 30 | 31 | @property (nonatomic, strong) AVCaptureVideoPreviewLayer *previewLayer; 32 | 33 | @property (nonatomic, strong) AVCaptureDevice *currentDevice; 34 | 35 | @property (nonatomic, strong) AVCaptureDeviceInput *videoInput; 36 | 37 | @property (nonatomic, strong) AVCaptureDeviceInput *audioInput; 38 | 39 | @property (nonatomic, strong) AVCaptureVideoDataOutput *videoOutput; 40 | 41 | @property (nonatomic, strong) AVCaptureAudioDataOutput *audioOutput; 42 | 43 | @property (nonatomic, strong) AVCaptureConnection *videoConnection; 44 | 45 | @property (nonatomic, strong) AVCaptureConnection *audioConnection; 46 | 47 | @property (nonatomic, strong) NSDictionary *audioSetting; 48 | 49 | @property (nonatomic, strong) AVCaptureMetadataOutput *metadataOutput; 50 | 51 | @property (nonatomic, strong) AVCaptureStillImageOutput *imageOutput; 52 | 53 | @property (nonatomic, strong) XDVideoWritter *videoWriter; 54 | 55 | @end 56 | 57 | @implementation XDCaptureService 58 | 59 | + (BOOL)videoGranted { 60 | if ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0) { 61 | AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo]; 62 | if(authStatus == AVAuthorizationStatusDenied){ 63 | return NO; 64 | } 65 | } 66 | return YES; 67 | } 68 | 69 | + (BOOL)audioGranted { 70 | if ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0) { 71 | AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio]; 72 | if(authStatus == AVAuthorizationStatusDenied){ 73 | return NO; 74 | } 75 | } 76 | return YES; 77 | } 78 | 79 | - (instancetype)init { 80 | self = [super init]; 81 | if (self) { 82 | _sessionQueue = dispatch_queue_create("com.caixindong.captureservice.session", DISPATCH_QUEUE_SERIAL); 83 | _writtingQueue = dispatch_queue_create("com.caixindong.captureservice.writting", DISPATCH_QUEUE_SERIAL); 84 | _outputQueue = dispatch_queue_create("com.caixindong.captureservice.output", DISPATCH_QUEUE_SERIAL); 85 | _shouldRecordAudio = NO; 86 | _firstStartRunning = NO; 87 | _isRunning = NO; 88 | _startSessionOnEnteringForeground = NO; 89 | _openNativeFaceDetect = NO; 90 | _devicePosition = AVCaptureDevicePositionFront; 91 | _videoDir = [NSTemporaryDirectory() stringByAppendingPathComponent:XDCVIDEODIR]; 92 | _sessionPreset = AVCaptureSessionPreset640x480; 93 | _openDepth = NO; 94 | _frameRate = 30; 95 | NSDictionary *compressionProperties = @{ 96 | AVVideoAverageBitRateKey : @(640 * 480 * 2.1), 97 | AVVideoExpectedSourceFrameRateKey : @(30), 98 | AVVideoMaxKeyFrameIntervalKey : @(30), 99 | AVVideoProfileLevelKey:AVVideoProfileLevelH264Main41, 100 | }; 101 | 102 | //宽高的设置影响录出来视频的尺寸 103 | _videoSetting = @{ 104 | AVVideoCodecKey: AVVideoCodecH264, 105 | AVVideoWidthKey: @(480), 106 | AVVideoHeightKey: @(640), 107 | AVVideoScalingModeKey: AVVideoScalingModeResizeAspect, 108 | AVVideoCompressionPropertiesKey: compressionProperties, 109 | }; 110 | } 111 | return self; 112 | } 113 | 114 | - (void)dealloc { 115 | NSLog(@"=============XDCaptureService dealloc============="); 116 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 117 | } 118 | 119 | - (void)startRunning { 120 | dispatch_async(_sessionQueue, ^{ 121 | NSError *error = nil; 122 | BOOL result = [self _setupSession:&error]; 123 | if (result) { 124 | _isRunning = YES; 125 | [_captureSession startRunning]; 126 | }else{ 127 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:serviceDidFailWithError:)]) { 128 | [self.delegate captureService:self serviceDidFailWithError:error]; 129 | } 130 | } 131 | }); 132 | } 133 | 134 | - (void)stopRunning { 135 | dispatch_async(_sessionQueue, ^{ 136 | _isRunning = NO; 137 | NSError *error = nil; 138 | [self _clearVideoFile:&error]; 139 | if (error) { 140 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:serviceDidFailWithError:)]) { 141 | [self.delegate captureService:self serviceDidFailWithError:error]; 142 | } 143 | } 144 | [_captureSession stopRunning]; 145 | }); 146 | } 147 | 148 | - (void)switchCamera { 149 | if (_openDepth) { 150 | return; 151 | } 152 | 153 | NSError *error; 154 | AVCaptureDevice *videoDevice = [self _inactiveCamera]; 155 | AVCaptureDeviceInput *videoInput = [AVCaptureDeviceInput deviceInputWithDevice:videoDevice error:&error]; 156 | 157 | if (videoInput) { 158 | [_captureSession beginConfiguration]; 159 | 160 | [_captureSession removeInput:self.videoInput]; 161 | 162 | if ([self.captureSession canAddInput:videoInput]) { 163 | [self.captureSession addInput:videoInput]; 164 | self.videoInput = videoInput; 165 | //切换摄像头videoConnection会变化,所以需要重新获取 166 | self.videoConnection = [self.videoOutput connectionWithMediaType:AVMediaTypeVideo]; 167 | if (_videoConnection.isVideoOrientationSupported) { 168 | _videoConnection.videoOrientation = AVCaptureVideoOrientationPortrait; 169 | } 170 | } else { 171 | [self.captureSession addInput:self.videoInput]; 172 | } 173 | 174 | [self.captureSession commitConfiguration]; 175 | } 176 | 177 | _devicePosition = _devicePosition == AVCaptureDevicePositionFront?AVCaptureDevicePositionBack:AVCaptureDevicePositionFront; 178 | } 179 | 180 | - (AVCaptureDevice *)_inactiveCamera { 181 | AVCaptureDevice *device = nil; 182 | if (_devicePosition == AVCaptureDevicePositionBack) { 183 | device = [self _cameraWithPosition:AVCaptureDevicePositionFront]; 184 | } else { 185 | device = [self _cameraWithPosition:AVCaptureDevicePositionBack]; 186 | } 187 | return device; 188 | } 189 | 190 | - (BOOL)depthSupported { 191 | NSString *deviceInfo = [self _getDeviceInfo]; 192 | double sysVersion = [[self _getSystemVersion] doubleValue]; 193 | NSArray *supportDuaDevices = @[@"iPhone9,2",@"iPhone10,2",@"iPhone10,5",]; 194 | NSArray *supportXDevices = @[@"iPhone10,3",@"iPhone10,6"]; 195 | BOOL deviceSupported = NO; 196 | if ([supportDuaDevices containsObject:deviceInfo] && _devicePosition == AVCaptureDevicePositionBack) { 197 | deviceSupported = YES; 198 | } 199 | if ([supportXDevices containsObject:deviceInfo]) { 200 | deviceSupported = YES; 201 | } 202 | BOOL systemSupported = sysVersion >= 11.0? YES:NO; 203 | return deviceSupported && systemSupported; 204 | } 205 | 206 | - (void)startRecording { 207 | dispatch_async(_writtingQueue, ^{ 208 | NSString *videoFilePath = [_videoDir stringByAppendingPathComponent:[NSString stringWithFormat:@"Record-%llu.mp4",mach_absolute_time()]]; 209 | 210 | _recordURL = [[NSURL alloc] initFileURLWithPath:videoFilePath]; 211 | 212 | if (_recordURL) { 213 | _videoWriter = [[XDVideoWritter alloc] initWithURL:_recordURL VideoSettings:_videoSetting audioSetting:_audioSetting]; 214 | _videoWriter.delegate = self; 215 | [_videoWriter startWriting]; 216 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureServiceRecorderDidStart:)]) { 217 | [self.delegate captureServiceRecorderDidStart:self]; 218 | } 219 | } else { 220 | NSLog(@"No record URL"); 221 | } 222 | }); 223 | } 224 | 225 | - (void)cancleRecording { 226 | dispatch_async(_writtingQueue, ^{ 227 | if (_videoWriter) { 228 | [_videoWriter cancleWriting]; 229 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureServiceRecorderDidCancel:)]) { 230 | [self.delegate captureServiceRecorderDidCancel:self]; 231 | } 232 | } 233 | }); 234 | } 235 | 236 | - (void)stopRecording { 237 | dispatch_async(_writtingQueue, ^{ 238 | if (_videoWriter) { 239 | [_videoWriter stopWritingAsyn]; 240 | } 241 | }); 242 | } 243 | 244 | - (void)capturePhoto { 245 | AVCaptureConnection *connection = [_imageOutput connectionWithMediaType:AVMediaTypeVideo]; 246 | if (connection.isVideoOrientationSupported) { 247 | connection.videoOrientation = AVCaptureVideoOrientationPortrait; 248 | } 249 | 250 | __weak typeof(self) weakSelf = self; 251 | [_imageOutput captureStillImageAsynchronouslyFromConnection:connection completionHandler:^(CMSampleBufferRef _Nullable imageDataSampleBuffer, NSError * _Nullable error) { 252 | __strong typeof(weakSelf) strongSelf = weakSelf; 253 | if (imageDataSampleBuffer != NULL) { 254 | NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer]; 255 | UIImage *image = [UIImage imageWithData:imageData]; 256 | if (strongSelf.delegate && [strongSelf.delegate respondsToSelector:@selector(captureService:capturePhoto:)]) { 257 | [strongSelf.delegate captureService:strongSelf capturePhoto:image]; 258 | } 259 | } 260 | }]; 261 | } 262 | 263 | #pragma mark - session configuration 264 | - (BOOL)_setupSession:(NSError **) error { 265 | if (_captureSession) { 266 | NSLog(@"session has existed"); 267 | return YES; 268 | } 269 | 270 | if (![self _clearVideoFile:error]) { 271 | return NO; 272 | } 273 | 274 | if (![[NSFileManager defaultManager] createDirectoryAtPath:_videoDir withIntermediateDirectories:YES attributes:nil error:error]) { 275 | return NO; 276 | } 277 | 278 | _captureSession = [[AVCaptureSession alloc] init]; 279 | _captureSession.sessionPreset = _sessionPreset; 280 | 281 | if (![self _setupVideoInputOutput:error]) { 282 | return NO; 283 | } 284 | 285 | if (![self _setupImageOutput:error]) { 286 | return NO; 287 | } 288 | 289 | if (self.shouldRecordAudio) { 290 | if (![self _setupAudioInputOutput:error]) { 291 | return NO; 292 | } 293 | } 294 | 295 | if (_openNativeFaceDetect) { 296 | if (![self _setupFaceDataOutput:error]) { 297 | return NO; 298 | } 299 | } 300 | 301 | if (self.preViewSource && [self.preViewSource respondsToSelector:@selector(preViewLayerSource)]) { 302 | self.previewLayer = [self.preViewSource preViewLayerSource]; 303 | [_previewLayer setSession:_captureSession]; 304 | [_previewLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill]; 305 | } else { 306 | self.previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:_captureSession]; 307 | //充满整个屏幕 308 | [_previewLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill]; 309 | 310 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:getPreviewLayer:)]) { 311 | [self.delegate captureService:self getPreviewLayer:_previewLayer]; 312 | } 313 | } 314 | 315 | //CaptureService和VideoWritter各自维护自己的生命周期,捕获视频流的状态与写入视频流的状态解耦分离,音视频状态变迁由captureservice内部管理,外层业务无需手动处理视频流变化 316 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_captureSessionNotification:) name:nil object:self.captureSession]; 317 | 318 | //为了适配低于iOS 9的版本,在iOS 9以前,当session start 还没完成就退到后台,回到前台会捕获AVCaptureSessionRuntimeErrorNotification,这时需要手动重新启动session,iOS 9以后系统对此做了优化,系统退到后台后会将session start缓存起来,回到前台会自动调用缓存的session start,无需手动调用 319 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_enterForegroundNotification:) name:UIApplicationWillEnterForegroundNotification object:nil]; 320 | 321 | return YES; 322 | } 323 | 324 | - (BOOL)_setupVideoInputOutput:(NSError **) error { 325 | self.currentDevice = [self _cameraWithPosition:_devicePosition]; 326 | 327 | self.videoInput = [[AVCaptureDeviceInput alloc] initWithDevice:_currentDevice error:error]; 328 | if (_videoInput) { 329 | if ([_captureSession canAddInput:_videoInput]) { 330 | [_captureSession addInput:_videoInput]; 331 | } else { 332 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.video" code:-2200 userInfo:@{NSLocalizedDescriptionKey:@"add video input fail"}]; 333 | return NO; 334 | } 335 | } else { 336 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.video" code:-2201 userInfo:@{NSLocalizedDescriptionKey:@"video input is nil"}]; 337 | return NO; 338 | } 339 | 340 | //稳定帧率 341 | CMTime frameDuration = CMTimeMake(1, _frameRate); 342 | if ([_currentDevice lockForConfiguration:error]) { 343 | _currentDevice.activeVideoMaxFrameDuration = frameDuration; 344 | _currentDevice.activeVideoMinFrameDuration = frameDuration; 345 | [_currentDevice unlockForConfiguration]; 346 | } else { 347 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.video" code:-2203 userInfo:@{NSLocalizedDescriptionKey:@"device lock fail(input)"}]; 348 | 349 | return NO; 350 | } 351 | 352 | self.videoOutput = [[AVCaptureVideoDataOutput alloc] init]; 353 | _videoOutput.videoSettings = @{(id)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA)}; 354 | //对迟到的帧做丢帧处理 355 | _videoOutput.alwaysDiscardsLateVideoFrames = NO; 356 | 357 | dispatch_queue_t videoQueue = dispatch_queue_create("com.caixindong.captureservice.video", DISPATCH_QUEUE_SERIAL); 358 | [_videoOutput setSampleBufferDelegate:self queue:videoQueue]; 359 | 360 | if ([_captureSession canAddOutput:_videoOutput]) { 361 | [_captureSession addOutput:_videoOutput]; 362 | } else { 363 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.video" code:-2204 userInfo:@{NSLocalizedDescriptionKey:@"device lock fail(output)"}]; 364 | return NO; 365 | } 366 | 367 | self.videoConnection = [self.videoOutput connectionWithMediaType:AVMediaTypeVideo]; 368 | //录制视频会有90度偏转,是因为相机传感器问题,所以在这里设置输出的视频流的方向 369 | if (_videoConnection.isVideoOrientationSupported) { 370 | _videoConnection.videoOrientation = AVCaptureVideoOrientationPortrait; 371 | } 372 | return YES; 373 | } 374 | 375 | - (AVCaptureDevice *)_cameraWithPosition:(AVCaptureDevicePosition)position { 376 | if (@available(iOS 10.0, *)) { 377 | //AVCaptureDeviceTypeBuiltInWideAngleCamera默认广角摄像头,AVCaptureDeviceTypeBuiltInTelephotoCamera长焦摄像头,AVCaptureDeviceTypeBuiltInDualCamera后置双摄像头,AVCaptureDeviceTypeBuiltInTrueDepthCamera红外前置摄像头 378 | NSMutableArray *mulArr = [NSMutableArray arrayWithObjects:AVCaptureDeviceTypeBuiltInWideAngleCamera,AVCaptureDeviceTypeBuiltInTelephotoCamera,nil]; 379 | if (@available(iOS 10.2, *)) { 380 | [mulArr addObject:AVCaptureDeviceTypeBuiltInDualCamera]; 381 | } 382 | if (@available(iOS 11.1, *)) { 383 | [mulArr addObject:AVCaptureDeviceTypeBuiltInTrueDepthCamera]; 384 | } 385 | AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[mulArr copy] mediaType:AVMediaTypeVideo position:position]; 386 | return discoverySession.devices.firstObject; 387 | } else { 388 | NSArray *videoDevices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; 389 | for (AVCaptureDevice *device in videoDevices) { 390 | if (device.position == position) { 391 | return device; 392 | } 393 | } 394 | } 395 | return nil; 396 | } 397 | 398 | - (BOOL)_setupImageOutput:(NSError **)error { 399 | self.imageOutput = [[AVCaptureStillImageOutput alloc] init]; 400 | NSDictionary *outputSetting = @{AVVideoCodecKey: AVVideoCodecJPEG}; 401 | [_imageOutput setOutputSettings:outputSetting]; 402 | if ([_captureSession canAddOutput:_imageOutput]) { 403 | [_captureSession addOutput:_imageOutput]; 404 | return YES; 405 | } else { 406 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.image" code:-2205 userInfo:@{NSLocalizedDescriptionKey:@"device lock fail(output)"}]; 407 | return NO; 408 | } 409 | } 410 | 411 | - (BOOL)_setupAudioInputOutput:(NSError **)error { 412 | AVCaptureDevice *audioDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; 413 | 414 | self.audioInput = [[AVCaptureDeviceInput alloc] initWithDevice:audioDevice error:error]; 415 | if (_audioInput) { 416 | if ([_captureSession canAddInput:_audioInput]) { 417 | [_captureSession addInput:_audioInput]; 418 | } else { 419 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.audio" code:-2206 userInfo:@{NSLocalizedDescriptionKey:@"add audio input fail"}]; 420 | return NO; 421 | } 422 | } else { 423 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.audio" code:-2207 userInfo:@{NSLocalizedDescriptionKey:@"device input is nil"}]; 424 | return NO; 425 | } 426 | 427 | self.audioOutput = [[AVCaptureAudioDataOutput alloc] init]; 428 | dispatch_queue_t audioQueue = dispatch_queue_create("com.caixindong.captureservice.audio", DISPATCH_QUEUE_SERIAL); 429 | [_audioOutput setSampleBufferDelegate:self queue:audioQueue]; 430 | 431 | if ([_captureSession canAddOutput:_audioOutput]) { 432 | [_captureSession addOutput:_audioOutput]; 433 | } else { 434 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.audio" code:-2208 userInfo:@{NSLocalizedDescriptionKey:@"add audio output fail"}]; 435 | return NO; 436 | } 437 | 438 | self.audioConnection = [self.audioOutput connectionWithMediaType:AVMediaTypeAudio]; 439 | 440 | self.audioSetting = [[self.audioOutput recommendedAudioSettingsForAssetWriterWithOutputFileType:AVFileTypeMPEG4] copy]; 441 | 442 | return YES; 443 | } 444 | 445 | - (BOOL)_setupFaceDataOutput:(NSError **)error { 446 | self.metadataOutput = [[AVCaptureMetadataOutput alloc] init]; 447 | 448 | if ([_captureSession canAddOutput:_metadataOutput]) { 449 | [_captureSession addOutput:_metadataOutput]; 450 | 451 | NSArray *metadataObjectTypes = @[AVMetadataObjectTypeFace]; 452 | _metadataOutput.metadataObjectTypes = metadataObjectTypes; 453 | dispatch_queue_t metaQueue = dispatch_queue_create("com.caixindong.captureservice.meta", DISPATCH_QUEUE_SERIAL); 454 | [_metadataOutput setMetadataObjectsDelegate:self queue:metaQueue]; 455 | return YES; 456 | } else { 457 | *error = [NSError errorWithDomain:@"com.caixindong.captureservice.face" code:-2209 userInfo:@{NSLocalizedDescriptionKey:@"add face output fail"}]; 458 | 459 | return NO; 460 | } 461 | } 462 | 463 | - (BOOL)_clearVideoFile:(NSError **)error { 464 | NSString *tmpDirPath = NSTemporaryDirectory(); 465 | NSString *videoDirPath = [tmpDirPath stringByAppendingPathComponent:XDCVIDEODIR]; 466 | BOOL isDir = NO; 467 | BOOL existed = [[NSFileManager defaultManager] fileExistsAtPath:videoDirPath isDirectory:&isDir]; 468 | if (isDir && existed) { 469 | if (![[NSFileManager defaultManager] removeItemAtPath:videoDirPath error:error]) { 470 | return NO; 471 | } 472 | } 473 | return YES; 474 | } 475 | 476 | #pragma mark - CaptureSession Notification 477 | - (void)_captureSessionNotification:(NSNotification *)notification { 478 | NSLog(@"_captureSessionNotification:%@",notification.name); 479 | if ([notification.name isEqualToString:AVCaptureSessionDidStartRunningNotification]) { 480 | if (!_firstStartRunning) { 481 | NSLog(@"session start running"); 482 | _firstStartRunning = YES; 483 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureServiceDidStartService:)]) { 484 | [self.delegate captureServiceDidStartService:self]; 485 | } 486 | } else { 487 | NSLog(@"session resunme running"); 488 | } 489 | } else if ([notification.name isEqualToString:AVCaptureSessionDidStopRunningNotification]) { 490 | if (!_isRunning) { 491 | NSLog(@"session stop running"); 492 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureServiceDidStopService:)]) { 493 | [self.delegate captureServiceDidStopService:self]; 494 | } 495 | } else { 496 | NSLog(@"interupte session stop running"); 497 | } 498 | } else if ([notification.name isEqualToString:AVCaptureSessionWasInterruptedNotification]) { 499 | NSLog(@"session was interupted, userInfo: %@",notification.userInfo); 500 | } else if ([notification.name isEqualToString:AVCaptureSessionInterruptionEndedNotification]) { 501 | NSLog(@"session interupted end"); 502 | } else if ([notification.name isEqualToString:AVCaptureSessionRuntimeErrorNotification]) { 503 | NSError *error = notification.userInfo[AVCaptureSessionErrorKey]; 504 | if (error.code == AVErrorDeviceIsNotAvailableInBackground) { 505 | NSLog(@"session runtime error : AVErrorDeviceIsNotAvailableInBackground"); 506 | _startSessionOnEnteringForeground = YES; 507 | } else { 508 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:serviceDidFailWithError:)]) { 509 | [self.delegate captureService:self serviceDidFailWithError:error]; 510 | } 511 | } 512 | } else { 513 | NSLog(@"handel other notification : %@",notification.name); 514 | } 515 | } 516 | 517 | #pragma mark - UIApplicationWillEnterForegroundNotification 518 | - (void)_enterForegroundNotification:(NSNotification *)notification { 519 | if (_startSessionOnEnteringForeground == YES) { 520 | NSLog(@"为了适配低于iOS 9的版本,在iOS 9以前,当session start 还没完成就退到后台,回到前台会捕获AVCaptureSessionRuntimeErrorNotification,这时需要手动重新启动session,iOS 9以后系统对此做了优化,系统退到后台后会将session start缓存起来,回到前台会自动调用缓存的session start,无需手动调用"); 521 | _startSessionOnEnteringForeground = NO; 522 | [self startRunning]; 523 | } 524 | } 525 | 526 | #pragma mark - AVCaptureVideoDataOutputSampleBufferDelegate && AVCaptureAudioDataOutputSampleBufferDelegate 527 | - (void)captureOutput:(AVCaptureOutput *)output didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection { 528 | //可以捕获到不同的线程 529 | if (connection == _videoConnection) { 530 | [self _processVideoData:sampleBuffer]; 531 | } else if (connection == _audioConnection) { 532 | [self _processAudioData:sampleBuffer]; 533 | } 534 | } 535 | 536 | #pragma mark - XDVideoWritterDelegate 537 | - (void)videoWritter:(XDVideoWritter *)writter didFailWithError:(NSError *)error { 538 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:recorderDidFailWithError:)]) { 539 | [self.delegate captureService:self recorderDidFailWithError:error]; 540 | } 541 | } 542 | 543 | - (void)videoWritter:(XDVideoWritter *)writter completeWriting:(NSError *)error { 544 | if (error) { 545 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:recorderDidFailWithError:)]) { 546 | [self.delegate captureService:self recorderDidFailWithError:error]; 547 | } 548 | } else { 549 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureServiceRecorderDidStop:)]) { 550 | [self.delegate captureServiceRecorderDidStop:self]; 551 | } 552 | } 553 | } 554 | 555 | #pragma mark - AVCaptureMetadataOutputObjectsDelegate 556 | -(void)captureOutput:(AVCaptureOutput *)output didOutputMetadataObjects:(NSArray<__kindof AVMetadataObject *> *)metadataObjects fromConnection:(AVCaptureConnection *)connection { 557 | NSMutableArray *transformedFaces = [NSMutableArray array]; 558 | for (AVMetadataObject *face in metadataObjects) { 559 | @autoreleasepool{ 560 | AVMetadataFaceObject *transformedFace = (AVMetadataFaceObject*)[self.previewLayer transformedMetadataObjectForMetadataObject:face]; 561 | if (transformedFace) { 562 | [transformedFaces addObject:transformedFace]; 563 | } 564 | }; 565 | } 566 | @autoreleasepool{ 567 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:outputFaceDetectData:)]) { 568 | [self.delegate captureService:self outputFaceDetectData:[transformedFaces copy]]; 569 | } 570 | }; 571 | } 572 | 573 | 574 | #pragma mark - process Data 575 | - (void)_processVideoData:(CMSampleBufferRef)sampleBuffer { 576 | //CFRetain的目的是为了每条业务线(写视频、抛帧)的sampleBuffer都是独立的 577 | if (_videoWriter && _videoWriter.isWriting) { 578 | CFRetain(sampleBuffer); 579 | dispatch_async(_writtingQueue, ^{ 580 | [_videoWriter appendSampleBuffer:sampleBuffer]; 581 | CFRelease(sampleBuffer); 582 | }); 583 | } 584 | 585 | CFRetain(sampleBuffer); 586 | //及时清理临时变量,防止出现内存高峰 587 | dispatch_async(_outputQueue, ^{ 588 | @autoreleasepool{ 589 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:outputSampleBuffer:)]) { 590 | [self.delegate captureService:self outputSampleBuffer:sampleBuffer]; 591 | } 592 | } 593 | CFRelease(sampleBuffer); 594 | }); 595 | } 596 | 597 | - (void)_processAudioData:(CMSampleBufferRef)sampleBuffer { 598 | if (_videoWriter && _videoWriter.isWriting) { 599 | CFRetain(sampleBuffer); 600 | dispatch_async(_writtingQueue, ^{ 601 | [_videoWriter appendSampleBuffer:sampleBuffer]; 602 | CFRelease(sampleBuffer); 603 | }); 604 | } 605 | } 606 | 607 | - (void)_processDepthData:(AVDepthData *)depthData time:(CMTime)timestamp API_AVAILABLE(ios(11.0)){ 608 | //像RGB图像一样,除了是单通道,但它们仍然可以表示为CV像素缓冲区,现在 CoreVideo 定义了在上一张幻灯片中看到类型的四个新像素格式。因为如果是在GPU上,会要求16位的值,而在CPU上,就都是32位的值 609 | AVDepthData *cDepthData = [depthData depthDataByConvertingToDepthDataType:kCVPixelFormatType_DepthFloat32]; 610 | dispatch_async(_outputQueue, ^{ 611 | if (self.delegate && [self.delegate respondsToSelector:@selector(captureService:captureTrueDepth:)]) { 612 | [self.delegate captureService:self captureTrueDepth:cDepthData]; 613 | } 614 | }); 615 | 616 | } 617 | 618 | #pragma mark - private 619 | - (NSString *)_getDeviceInfo { 620 | int mib[2]; 621 | size_t len; 622 | char *machine; 623 | 624 | mib[0] = CTL_HW; 625 | mib[1] = HW_MACHINE; 626 | sysctl(mib, 2, NULL, &len, NULL, 0); 627 | machine = malloc(len); 628 | sysctl(mib, 2, machine, &len, NULL, 0); 629 | 630 | NSString *platform = [NSString stringWithCString:machine encoding:NSASCIIStringEncoding]; 631 | free(machine); 632 | 633 | return platform; 634 | } 635 | 636 | - (NSString *)_getSystemVersion { 637 | return [UIDevice currentDevice].systemVersion; 638 | } 639 | 640 | #pragma mark - camera setting 641 | - (CGFloat)deviceISO { 642 | return _currentDevice.ISO; 643 | } 644 | 645 | - (CGFloat)deviceMinISO { 646 | return _currentDevice.activeFormat.minISO; 647 | } 648 | 649 | - (CGFloat)deviceMaxISO { 650 | return _currentDevice.activeFormat.maxISO; 651 | } 652 | 653 | - (CGFloat)deviceAperture { 654 | return _currentDevice.lensAperture; 655 | } 656 | 657 | - (AVCaptureExposureMode)exposureMode { 658 | return _currentDevice.exposureMode; 659 | } 660 | 661 | - (void)setExposureMode:(AVCaptureExposureMode)exposureMode { 662 | NSError *error = nil; 663 | if ([_currentDevice lockForConfiguration:&error]) { 664 | if (_currentDevice.isExposurePointOfInterestSupported && [_currentDevice isExposureModeSupported:exposureMode]) { 665 | _currentDevice.exposureMode = exposureMode; 666 | } else { 667 | NSLog(@"Device no support exposureMode"); 668 | } 669 | [_currentDevice unlockForConfiguration]; 670 | } else { 671 | NSLog(@"Device lock configuration error:%@",error.localizedDescription); 672 | } 673 | } 674 | 675 | - (void)setExposurePoint:(CGPoint)exposurePoint { 676 | NSError *error = nil; 677 | if ([_currentDevice lockForConfiguration:&error]) { 678 | if (_currentDevice.isExposurePointOfInterestSupported && [_currentDevice isExposureModeSupported:AVCaptureExposureModeAutoExpose]) { 679 | _currentDevice.exposureMode = AVCaptureExposureModeAutoExpose; 680 | _currentDevice.exposurePointOfInterest = exposurePoint; 681 | } else { 682 | NSLog(@"Device no support ExposurePointOfInterestSupported"); 683 | } 684 | [_currentDevice unlockForConfiguration]; 685 | } else { 686 | NSLog(@"Device lock configuration error:%@",error.localizedDescription); 687 | } 688 | } 689 | 690 | - (CMTime)deviceExposureDuration { 691 | return _currentDevice.exposureDuration; 692 | } 693 | 694 | - (AVCaptureFocusMode)focusMode { 695 | return _currentDevice.focusMode; 696 | } 697 | 698 | - (AVCaptureWhiteBalanceMode)whiteBalanceMode { 699 | return _currentDevice.whiteBalanceMode; 700 | } 701 | 702 | - (void)setWhiteBalanceMode:(AVCaptureWhiteBalanceMode)whiteBalanceMode { 703 | NSError *error = nil; 704 | if ([_currentDevice lockForConfiguration:&error]) { 705 | if ([_currentDevice isWhiteBalanceModeSupported:whiteBalanceMode]) { 706 | _currentDevice.whiteBalanceMode = whiteBalanceMode; 707 | } else { 708 | NSLog(@"Device no support whiteBalanceMode"); 709 | } 710 | } else { 711 | NSLog(@"Device lock configuration error:%@",error.localizedDescription); 712 | } 713 | } 714 | 715 | - (void)setFocusMode:(AVCaptureFocusMode)focusMode { 716 | NSError *error = nil; 717 | if ([_currentDevice lockForConfiguration:&error]) { 718 | if (_currentDevice.isFocusPointOfInterestSupported && [_currentDevice isFocusModeSupported:focusMode]) { 719 | _currentDevice.focusMode = focusMode; 720 | } else { 721 | NSLog(@"Device no support focusMode"); 722 | } 723 | [_currentDevice unlockForConfiguration]; 724 | } else { 725 | NSLog(@"Device lock configuration error:%@",error.localizedDescription); 726 | } 727 | } 728 | 729 | - (void)setFocusPoint:(CGPoint)focusPoint { 730 | NSError *error = nil; 731 | if ([_currentDevice lockForConfiguration:&error]) { 732 | if (_currentDevice.isFocusPointOfInterestSupported && [_currentDevice isFocusModeSupported:AVCaptureFocusModeAutoFocus]) { 733 | _currentDevice.focusMode = AVCaptureFocusModeAutoFocus; 734 | _currentDevice.focusPointOfInterest = focusPoint; 735 | } else { 736 | NSLog(@"Device no support FocusPointOfInterestSupported"); 737 | } 738 | [_currentDevice unlockForConfiguration]; 739 | } else { 740 | NSLog(@"Device lock configuration error:%@",error.localizedDescription); 741 | } 742 | } 743 | 744 | - (BOOL)supportsTapToFocus { 745 | return [_currentDevice isFocusPointOfInterestSupported]; 746 | } 747 | 748 | - (BOOL)supportsTapToExpose { 749 | return [_currentDevice isExposurePointOfInterestSupported]; 750 | } 751 | 752 | - (BOOL)hasTorch { 753 | return _currentDevice.hasTorch; 754 | } 755 | 756 | - (AVCaptureTorchMode)torchMode { 757 | return _currentDevice.torchMode; 758 | } 759 | 760 | - (void)setTorchMode:(AVCaptureTorchMode)torchMode { 761 | if (_currentDevice.torchMode != torchMode && [_currentDevice isTorchModeSupported:torchMode]) { 762 | NSError *error; 763 | if ([_currentDevice lockForConfiguration:&error]) { 764 | _currentDevice.torchMode = torchMode; 765 | [_currentDevice unlockForConfiguration]; 766 | } else { 767 | NSLog(@"Device lock configuration error:%@",error.localizedDescription); 768 | } 769 | } else { 770 | NSLog(@"Device no support torch"); 771 | } 772 | } 773 | 774 | - (BOOL)hasFlash { 775 | return _currentDevice.hasFlash; 776 | } 777 | 778 | - (AVCaptureFlashMode)flashMode { 779 | return _currentDevice.flashMode; 780 | } 781 | 782 | - (void)setFlashMode:(AVCaptureFlashMode)flashMode { 783 | if (_currentDevice.flashMode != flashMode && [_currentDevice isFlashModeSupported:flashMode]) { 784 | NSError *error; 785 | if ([_currentDevice lockForConfiguration:&error]) { 786 | _currentDevice.flashMode = flashMode; 787 | [_currentDevice unlockForConfiguration]; 788 | } else { 789 | NSLog(@"Device lock configuration error:%@",error.localizedDescription); 790 | } 791 | } else { 792 | NSLog(@"Device no support flash"); 793 | } 794 | } 795 | 796 | - (BOOL)isRecording { 797 | if (_videoWriter) { 798 | return _videoWriter.isWriting; 799 | } else { 800 | return NO; 801 | } 802 | } 803 | 804 | @end 805 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0828A766F18AEABE8AFB4F50D2C49C51 /* XDVideoWritter.h in Headers */ = {isa = PBXBuildFile; fileRef = C2A80777E11A23223C8057BE0D845839 /* XDVideoWritter.h */; settings = {ATTRIBUTES = (Project, ); }; }; 11 | 1E8028F200DF1DA325BF27F07C11106F /* XDCaptureService.h in Headers */ = {isa = PBXBuildFile; fileRef = C1202CB36878DEE30DAAACC6EE2DC8DA /* XDCaptureService.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 24570317F7CBD9629A7C5CCDABAA67C1 /* XDCaptureService-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B01C7265456DE2A3A614BCAD9D13780 /* XDCaptureService-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 3DCE4BEAD8A847D7247CF2858C32FDC8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48E77610E792D34CA164C5998AEC6821 /* Foundation.framework */; }; 14 | 408EF54B1011DE252C9840F3C8668A4D /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC6948AEA53863E6915ADC5FD2037AE8 /* CoreImage.framework */; }; 15 | 4B2319A017407C7280873E2D7C989062 /* Pods-XDCaptureService_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 26288494BEC009F527A7C3AEABAF0461 /* Pods-XDCaptureService_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 54D894FB76D915B8AEEF5193A711DA61 /* Pods-XDCaptureService_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 57DA4869BF74911290BCB7969B337188 /* Pods-XDCaptureService_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 5769D456D624574EAC7DAEEC843CA630 /* XDVideoWritter.m in Sources */ = {isa = PBXBuildFile; fileRef = 88071730E480C1BD5B5A0D5754B2FF40 /* XDVideoWritter.m */; }; 18 | 59C698F41B57127040BC7C777425405E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48E77610E792D34CA164C5998AEC6821 /* Foundation.framework */; }; 19 | 62443A71B80FA2381ACA3F0867C485E5 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A0E45E5894BD86EE79311B91AA249F /* AVFoundation.framework */; }; 20 | 93A70B180F9D7BA12A882CD4929ACEF1 /* XDCaptureService-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D36F8A007E2D0BF7F4EC96C7F30E4EC8 /* XDCaptureService-dummy.m */; }; 21 | 94A47FE9AE72EA65983D54439EB32F38 /* Pods-XDCaptureService_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 762B0ACD585FBB7FB8A3EF333FF768D6 /* Pods-XDCaptureService_Example-dummy.m */; }; 22 | A22360EC39EC56CFC4012AE46A19AB19 /* Pods-XDCaptureService_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FE82218671255C0854ECBCBD17E1B409 /* Pods-XDCaptureService_Tests-dummy.m */; }; 23 | DCC68458BF2E41687CC2F90E666D34D9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48E77610E792D34CA164C5998AEC6821 /* Foundation.framework */; }; 24 | EA2537189BA2C63DC83418895F069853 /* XDCaptureService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC62246934FA775AC6C949EB49D938C /* XDCaptureService.m */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 1F898BC2451BACF4805BE67951DDEFB0 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = D4890898A65BA664C765F60667C93DF3; 33 | remoteInfo = XDCaptureService; 34 | }; 35 | 4DA353F5D76233A2CAE601D41E29B3E2 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = 7C97A2036D3F606AEDD781E7B24A42B9; 40 | remoteInfo = "Pods-XDCaptureService_Example"; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 15EF8094B961CDAD6B0225C4210D42E1 /* Pods-XDCaptureService_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XDCaptureService_Example.debug.xcconfig"; sourceTree = ""; }; 46 | 20BAD66A593F9EFAE1F811BF55CF33A9 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 47 | 26288494BEC009F527A7C3AEABAF0461 /* Pods-XDCaptureService_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-XDCaptureService_Example-umbrella.h"; sourceTree = ""; }; 48 | 28061AB8D7DF3F7ECC0CD9B1990C9680 /* XDCaptureService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = XDCaptureService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 29E14BC0991DE5F3CFA92B9E103654D3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | 2F7CCCC47E73076741D2562DD10C9DBA /* XDCaptureService.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = XDCaptureService.modulemap; sourceTree = ""; }; 51 | 3DD075B84FF2DD325C98D83A0AC2195F /* Pods-XDCaptureService_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-XDCaptureService_Example.modulemap"; sourceTree = ""; }; 52 | 4336E0B82A8F2286A2E9EA6E44DC38C5 /* Pods-XDCaptureService_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XDCaptureService_Tests.release.xcconfig"; sourceTree = ""; }; 53 | 48E77610E792D34CA164C5998AEC6821 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 54 | 4BC62246934FA775AC6C949EB49D938C /* XDCaptureService.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = XDCaptureService.m; path = XDCaptureService/Classes/XDCaptureService.m; sourceTree = ""; }; 55 | 57DA4869BF74911290BCB7969B337188 /* Pods-XDCaptureService_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-XDCaptureService_Tests-umbrella.h"; sourceTree = ""; }; 56 | 762B0ACD585FBB7FB8A3EF333FF768D6 /* Pods-XDCaptureService_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-XDCaptureService_Example-dummy.m"; sourceTree = ""; }; 57 | 77405D42BC32FB46E44E65BEAF1B1AD2 /* Pods-XDCaptureService_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XDCaptureService_Tests-frameworks.sh"; sourceTree = ""; }; 58 | 7A58D87AF9CE5FD72F3B17B5CF4B91A3 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 59 | 7B01C7265456DE2A3A614BCAD9D13780 /* XDCaptureService-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XDCaptureService-umbrella.h"; sourceTree = ""; }; 60 | 82FD3C3F7E9759E27867DF9FE1F8931B /* XDCaptureService.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = XDCaptureService.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 61 | 86643EAA7BB089A2E0623AD2BEA7A311 /* Pods_XDCaptureService_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_XDCaptureService_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 88071730E480C1BD5B5A0D5754B2FF40 /* XDVideoWritter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = XDVideoWritter.m; path = XDCaptureService/Classes/XDVideoWritter.m; sourceTree = ""; }; 63 | 893844150C2D1D243700F333F37501B9 /* Pods-XDCaptureService_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XDCaptureService_Example.release.xcconfig"; sourceTree = ""; }; 64 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 65 | 9749DE6B50AA26CF6CBED7961B70C072 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | AA9141AEB4AF0C7309B8B1071E1BDFF4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | ACDF1D3205DC830E70937DBEA5E111E3 /* Pods-XDCaptureService_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-XDCaptureService_Example-acknowledgements.plist"; sourceTree = ""; }; 68 | AF7298143443ED3260A4E52CF47C9DA7 /* Pods-XDCaptureService_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-XDCaptureService_Example-acknowledgements.markdown"; sourceTree = ""; }; 69 | B5A0E45E5894BD86EE79311B91AA249F /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; }; 70 | C1202CB36878DEE30DAAACC6EE2DC8DA /* XDCaptureService.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = XDCaptureService.h; path = XDCaptureService/Classes/XDCaptureService.h; sourceTree = ""; }; 71 | C2A80777E11A23223C8057BE0D845839 /* XDVideoWritter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = XDVideoWritter.h; path = XDCaptureService/Classes/XDVideoWritter.h; sourceTree = ""; }; 72 | D258F64BFD9CF9CA26ADDD9AA19EB614 /* Pods-XDCaptureService_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XDCaptureService_Tests-resources.sh"; sourceTree = ""; }; 73 | D36F8A007E2D0BF7F4EC96C7F30E4EC8 /* XDCaptureService-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "XDCaptureService-dummy.m"; sourceTree = ""; }; 74 | D3CDC0665237A719A0AE92ACDAD20AAE /* XDCaptureService-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XDCaptureService-prefix.pch"; sourceTree = ""; }; 75 | DE8EA415985E7889FBFD1EDAAF0AC5F0 /* Pods-XDCaptureService_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-XDCaptureService_Tests-acknowledgements.markdown"; sourceTree = ""; }; 76 | DFE55FEF405FC4CB8E458854256D7699 /* Pods-XDCaptureService_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-XDCaptureService_Tests.modulemap"; sourceTree = ""; }; 77 | E6ABCA688E71134B8FD481722946C6DD /* Pods_XDCaptureService_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_XDCaptureService_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 78 | E83278C45624815110110D78EFFEEE97 /* Pods-XDCaptureService_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XDCaptureService_Example-resources.sh"; sourceTree = ""; }; 79 | F24122FF7E583E9DCB9CF2655FED014D /* Pods-XDCaptureService_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XDCaptureService_Example-frameworks.sh"; sourceTree = ""; }; 80 | F4F7433183BA9077C5CD38C83A64D34D /* XDCaptureService.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = XDCaptureService.xcconfig; sourceTree = ""; }; 81 | F9032F9EC64A65F4A1F601C592C5B6E5 /* Pods-XDCaptureService_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XDCaptureService_Tests.debug.xcconfig"; sourceTree = ""; }; 82 | FC6948AEA53863E6915ADC5FD2037AE8 /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreImage.framework; sourceTree = DEVELOPER_DIR; }; 83 | FD5F2DD206FB15F6411B5BCC6DD2D029 /* Pods-XDCaptureService_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-XDCaptureService_Tests-acknowledgements.plist"; sourceTree = ""; }; 84 | FE82218671255C0854ECBCBD17E1B409 /* Pods-XDCaptureService_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-XDCaptureService_Tests-dummy.m"; sourceTree = ""; }; 85 | /* End PBXFileReference section */ 86 | 87 | /* Begin PBXFrameworksBuildPhase section */ 88 | 6B6F40A61C8742088FDF7DDA816703CB /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 59C698F41B57127040BC7C777425405E /* Foundation.framework in Frameworks */, 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | 8A84DD82618B0BB90CF1FA6662FDE270 /* Frameworks */ = { 97 | isa = PBXFrameworksBuildPhase; 98 | buildActionMask = 2147483647; 99 | files = ( 100 | 62443A71B80FA2381ACA3F0867C485E5 /* AVFoundation.framework in Frameworks */, 101 | 408EF54B1011DE252C9840F3C8668A4D /* CoreImage.framework in Frameworks */, 102 | 3DCE4BEAD8A847D7247CF2858C32FDC8 /* Foundation.framework in Frameworks */, 103 | ); 104 | runOnlyForDeploymentPostprocessing = 0; 105 | }; 106 | 9770DE8E453F4F8A49CAF63C1B2A27AD /* Frameworks */ = { 107 | isa = PBXFrameworksBuildPhase; 108 | buildActionMask = 2147483647; 109 | files = ( 110 | DCC68458BF2E41687CC2F90E666D34D9 /* Foundation.framework in Frameworks */, 111 | ); 112 | runOnlyForDeploymentPostprocessing = 0; 113 | }; 114 | /* End PBXFrameworksBuildPhase section */ 115 | 116 | /* Begin PBXGroup section */ 117 | 0FC4734E02DA7A90ACD6C39496D0602E /* Pod */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 7A58D87AF9CE5FD72F3B17B5CF4B91A3 /* LICENSE */, 121 | 20BAD66A593F9EFAE1F811BF55CF33A9 /* README.md */, 122 | 82FD3C3F7E9759E27867DF9FE1F8931B /* XDCaptureService.podspec */, 123 | ); 124 | name = Pod; 125 | sourceTree = ""; 126 | }; 127 | 122DA2E5084A4393C29BE363C764795C /* Frameworks */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 2AEDB48B19022AC9EDE28263A6853EA2 /* iOS */, 131 | ); 132 | name = Frameworks; 133 | sourceTree = ""; 134 | }; 135 | 2AEDB48B19022AC9EDE28263A6853EA2 /* iOS */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | B5A0E45E5894BD86EE79311B91AA249F /* AVFoundation.framework */, 139 | FC6948AEA53863E6915ADC5FD2037AE8 /* CoreImage.framework */, 140 | 48E77610E792D34CA164C5998AEC6821 /* Foundation.framework */, 141 | ); 142 | name = iOS; 143 | sourceTree = ""; 144 | }; 145 | 4C34489DDCEB504125C50FF5C61BF5FA /* XDCaptureService */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | C1202CB36878DEE30DAAACC6EE2DC8DA /* XDCaptureService.h */, 149 | 4BC62246934FA775AC6C949EB49D938C /* XDCaptureService.m */, 150 | C2A80777E11A23223C8057BE0D845839 /* XDVideoWritter.h */, 151 | 88071730E480C1BD5B5A0D5754B2FF40 /* XDVideoWritter.m */, 152 | 0FC4734E02DA7A90ACD6C39496D0602E /* Pod */, 153 | C61B6BB48F180B5C2F61CBC4EDE408B7 /* Support Files */, 154 | ); 155 | name = XDCaptureService; 156 | path = ../..; 157 | sourceTree = ""; 158 | }; 159 | 4FB338CD09F7DE22C81E27AAADACE498 /* Targets Support Files */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 543FE830D0F68F0D79AA743679975A17 /* Pods-XDCaptureService_Example */, 163 | A4FD55B8CD3D257E67DFAFF9DF9EB3C2 /* Pods-XDCaptureService_Tests */, 164 | ); 165 | name = "Targets Support Files"; 166 | sourceTree = ""; 167 | }; 168 | 543FE830D0F68F0D79AA743679975A17 /* Pods-XDCaptureService_Example */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 9749DE6B50AA26CF6CBED7961B70C072 /* Info.plist */, 172 | 3DD075B84FF2DD325C98D83A0AC2195F /* Pods-XDCaptureService_Example.modulemap */, 173 | AF7298143443ED3260A4E52CF47C9DA7 /* Pods-XDCaptureService_Example-acknowledgements.markdown */, 174 | ACDF1D3205DC830E70937DBEA5E111E3 /* Pods-XDCaptureService_Example-acknowledgements.plist */, 175 | 762B0ACD585FBB7FB8A3EF333FF768D6 /* Pods-XDCaptureService_Example-dummy.m */, 176 | F24122FF7E583E9DCB9CF2655FED014D /* Pods-XDCaptureService_Example-frameworks.sh */, 177 | E83278C45624815110110D78EFFEEE97 /* Pods-XDCaptureService_Example-resources.sh */, 178 | 26288494BEC009F527A7C3AEABAF0461 /* Pods-XDCaptureService_Example-umbrella.h */, 179 | 15EF8094B961CDAD6B0225C4210D42E1 /* Pods-XDCaptureService_Example.debug.xcconfig */, 180 | 893844150C2D1D243700F333F37501B9 /* Pods-XDCaptureService_Example.release.xcconfig */, 181 | ); 182 | name = "Pods-XDCaptureService_Example"; 183 | path = "Target Support Files/Pods-XDCaptureService_Example"; 184 | sourceTree = ""; 185 | }; 186 | 7DB346D0F39D3F0E887471402A8071AB = { 187 | isa = PBXGroup; 188 | children = ( 189 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 190 | 977B2A77E7CBA35769511AACCEFB1D8E /* Development Pods */, 191 | 122DA2E5084A4393C29BE363C764795C /* Frameworks */, 192 | 93B910F9C30EECC29F8B3ABF92E8AF8F /* Products */, 193 | 4FB338CD09F7DE22C81E27AAADACE498 /* Targets Support Files */, 194 | ); 195 | sourceTree = ""; 196 | }; 197 | 93B910F9C30EECC29F8B3ABF92E8AF8F /* Products */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | E6ABCA688E71134B8FD481722946C6DD /* Pods_XDCaptureService_Example.framework */, 201 | 86643EAA7BB089A2E0623AD2BEA7A311 /* Pods_XDCaptureService_Tests.framework */, 202 | 28061AB8D7DF3F7ECC0CD9B1990C9680 /* XDCaptureService.framework */, 203 | ); 204 | name = Products; 205 | sourceTree = ""; 206 | }; 207 | 977B2A77E7CBA35769511AACCEFB1D8E /* Development Pods */ = { 208 | isa = PBXGroup; 209 | children = ( 210 | 4C34489DDCEB504125C50FF5C61BF5FA /* XDCaptureService */, 211 | ); 212 | name = "Development Pods"; 213 | sourceTree = ""; 214 | }; 215 | A4FD55B8CD3D257E67DFAFF9DF9EB3C2 /* Pods-XDCaptureService_Tests */ = { 216 | isa = PBXGroup; 217 | children = ( 218 | 29E14BC0991DE5F3CFA92B9E103654D3 /* Info.plist */, 219 | DFE55FEF405FC4CB8E458854256D7699 /* Pods-XDCaptureService_Tests.modulemap */, 220 | DE8EA415985E7889FBFD1EDAAF0AC5F0 /* Pods-XDCaptureService_Tests-acknowledgements.markdown */, 221 | FD5F2DD206FB15F6411B5BCC6DD2D029 /* Pods-XDCaptureService_Tests-acknowledgements.plist */, 222 | FE82218671255C0854ECBCBD17E1B409 /* Pods-XDCaptureService_Tests-dummy.m */, 223 | 77405D42BC32FB46E44E65BEAF1B1AD2 /* Pods-XDCaptureService_Tests-frameworks.sh */, 224 | D258F64BFD9CF9CA26ADDD9AA19EB614 /* Pods-XDCaptureService_Tests-resources.sh */, 225 | 57DA4869BF74911290BCB7969B337188 /* Pods-XDCaptureService_Tests-umbrella.h */, 226 | F9032F9EC64A65F4A1F601C592C5B6E5 /* Pods-XDCaptureService_Tests.debug.xcconfig */, 227 | 4336E0B82A8F2286A2E9EA6E44DC38C5 /* Pods-XDCaptureService_Tests.release.xcconfig */, 228 | ); 229 | name = "Pods-XDCaptureService_Tests"; 230 | path = "Target Support Files/Pods-XDCaptureService_Tests"; 231 | sourceTree = ""; 232 | }; 233 | C61B6BB48F180B5C2F61CBC4EDE408B7 /* Support Files */ = { 234 | isa = PBXGroup; 235 | children = ( 236 | AA9141AEB4AF0C7309B8B1071E1BDFF4 /* Info.plist */, 237 | 2F7CCCC47E73076741D2562DD10C9DBA /* XDCaptureService.modulemap */, 238 | F4F7433183BA9077C5CD38C83A64D34D /* XDCaptureService.xcconfig */, 239 | D36F8A007E2D0BF7F4EC96C7F30E4EC8 /* XDCaptureService-dummy.m */, 240 | D3CDC0665237A719A0AE92ACDAD20AAE /* XDCaptureService-prefix.pch */, 241 | 7B01C7265456DE2A3A614BCAD9D13780 /* XDCaptureService-umbrella.h */, 242 | ); 243 | name = "Support Files"; 244 | path = "Example/Pods/Target Support Files/XDCaptureService"; 245 | sourceTree = ""; 246 | }; 247 | /* End PBXGroup section */ 248 | 249 | /* Begin PBXHeadersBuildPhase section */ 250 | 06F41DD77815162872F520C459B589D9 /* Headers */ = { 251 | isa = PBXHeadersBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | 54D894FB76D915B8AEEF5193A711DA61 /* Pods-XDCaptureService_Tests-umbrella.h in Headers */, 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | B66BE8BE1AD5CD0718F9E47DC67F323F /* Headers */ = { 259 | isa = PBXHeadersBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | 4B2319A017407C7280873E2D7C989062 /* Pods-XDCaptureService_Example-umbrella.h in Headers */, 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | F9369AF33F68BB51BA2377B9FCE1B69C /* Headers */ = { 267 | isa = PBXHeadersBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 24570317F7CBD9629A7C5CCDABAA67C1 /* XDCaptureService-umbrella.h in Headers */, 271 | 1E8028F200DF1DA325BF27F07C11106F /* XDCaptureService.h in Headers */, 272 | 0828A766F18AEABE8AFB4F50D2C49C51 /* XDVideoWritter.h in Headers */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXHeadersBuildPhase section */ 277 | 278 | /* Begin PBXNativeTarget section */ 279 | 4A3E35E67E0E755B5A551D95888BEBBB /* Pods-XDCaptureService_Tests */ = { 280 | isa = PBXNativeTarget; 281 | buildConfigurationList = 1EFF55E326468E35BE5D115F1F9F8239 /* Build configuration list for PBXNativeTarget "Pods-XDCaptureService_Tests" */; 282 | buildPhases = ( 283 | 17EFD04CE87E6F2F74F56FF8532F3B02 /* Sources */, 284 | 6B6F40A61C8742088FDF7DDA816703CB /* Frameworks */, 285 | 06F41DD77815162872F520C459B589D9 /* Headers */, 286 | ); 287 | buildRules = ( 288 | ); 289 | dependencies = ( 290 | ECBF897905513F5D63F1E07F4DE38F1A /* PBXTargetDependency */, 291 | ); 292 | name = "Pods-XDCaptureService_Tests"; 293 | productName = "Pods-XDCaptureService_Tests"; 294 | productReference = 86643EAA7BB089A2E0623AD2BEA7A311 /* Pods_XDCaptureService_Tests.framework */; 295 | productType = "com.apple.product-type.framework"; 296 | }; 297 | 7C97A2036D3F606AEDD781E7B24A42B9 /* Pods-XDCaptureService_Example */ = { 298 | isa = PBXNativeTarget; 299 | buildConfigurationList = 1ECC837F07209EBB3EC18012E63E3F6B /* Build configuration list for PBXNativeTarget "Pods-XDCaptureService_Example" */; 300 | buildPhases = ( 301 | FFE8FD1C9788C4A99D3D6142F8545E8C /* Sources */, 302 | 9770DE8E453F4F8A49CAF63C1B2A27AD /* Frameworks */, 303 | B66BE8BE1AD5CD0718F9E47DC67F323F /* Headers */, 304 | ); 305 | buildRules = ( 306 | ); 307 | dependencies = ( 308 | 58B8C4045726447D093B418939A9DEF3 /* PBXTargetDependency */, 309 | ); 310 | name = "Pods-XDCaptureService_Example"; 311 | productName = "Pods-XDCaptureService_Example"; 312 | productReference = E6ABCA688E71134B8FD481722946C6DD /* Pods_XDCaptureService_Example.framework */; 313 | productType = "com.apple.product-type.framework"; 314 | }; 315 | D4890898A65BA664C765F60667C93DF3 /* XDCaptureService */ = { 316 | isa = PBXNativeTarget; 317 | buildConfigurationList = 3C091AF431F19CDE24D54D65E820402E /* Build configuration list for PBXNativeTarget "XDCaptureService" */; 318 | buildPhases = ( 319 | C5E4DD3F13F3C4D42F971F520FEFC199 /* Sources */, 320 | 8A84DD82618B0BB90CF1FA6662FDE270 /* Frameworks */, 321 | F9369AF33F68BB51BA2377B9FCE1B69C /* Headers */, 322 | ); 323 | buildRules = ( 324 | ); 325 | dependencies = ( 326 | ); 327 | name = XDCaptureService; 328 | productName = XDCaptureService; 329 | productReference = 28061AB8D7DF3F7ECC0CD9B1990C9680 /* XDCaptureService.framework */; 330 | productType = "com.apple.product-type.framework"; 331 | }; 332 | /* End PBXNativeTarget section */ 333 | 334 | /* Begin PBXProject section */ 335 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 336 | isa = PBXProject; 337 | attributes = { 338 | LastSwiftUpdateCheck = 0930; 339 | LastUpgradeCheck = 0930; 340 | }; 341 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 342 | compatibilityVersion = "Xcode 3.2"; 343 | developmentRegion = English; 344 | hasScannedForEncodings = 0; 345 | knownRegions = ( 346 | en, 347 | ); 348 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 349 | productRefGroup = 93B910F9C30EECC29F8B3ABF92E8AF8F /* Products */; 350 | projectDirPath = ""; 351 | projectRoot = ""; 352 | targets = ( 353 | 7C97A2036D3F606AEDD781E7B24A42B9 /* Pods-XDCaptureService_Example */, 354 | 4A3E35E67E0E755B5A551D95888BEBBB /* Pods-XDCaptureService_Tests */, 355 | D4890898A65BA664C765F60667C93DF3 /* XDCaptureService */, 356 | ); 357 | }; 358 | /* End PBXProject section */ 359 | 360 | /* Begin PBXSourcesBuildPhase section */ 361 | 17EFD04CE87E6F2F74F56FF8532F3B02 /* Sources */ = { 362 | isa = PBXSourcesBuildPhase; 363 | buildActionMask = 2147483647; 364 | files = ( 365 | A22360EC39EC56CFC4012AE46A19AB19 /* Pods-XDCaptureService_Tests-dummy.m in Sources */, 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | C5E4DD3F13F3C4D42F971F520FEFC199 /* Sources */ = { 370 | isa = PBXSourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | 93A70B180F9D7BA12A882CD4929ACEF1 /* XDCaptureService-dummy.m in Sources */, 374 | EA2537189BA2C63DC83418895F069853 /* XDCaptureService.m in Sources */, 375 | 5769D456D624574EAC7DAEEC843CA630 /* XDVideoWritter.m in Sources */, 376 | ); 377 | runOnlyForDeploymentPostprocessing = 0; 378 | }; 379 | FFE8FD1C9788C4A99D3D6142F8545E8C /* Sources */ = { 380 | isa = PBXSourcesBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | 94A47FE9AE72EA65983D54439EB32F38 /* Pods-XDCaptureService_Example-dummy.m in Sources */, 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | /* End PBXSourcesBuildPhase section */ 388 | 389 | /* Begin PBXTargetDependency section */ 390 | 58B8C4045726447D093B418939A9DEF3 /* PBXTargetDependency */ = { 391 | isa = PBXTargetDependency; 392 | name = XDCaptureService; 393 | target = D4890898A65BA664C765F60667C93DF3 /* XDCaptureService */; 394 | targetProxy = 1F898BC2451BACF4805BE67951DDEFB0 /* PBXContainerItemProxy */; 395 | }; 396 | ECBF897905513F5D63F1E07F4DE38F1A /* PBXTargetDependency */ = { 397 | isa = PBXTargetDependency; 398 | name = "Pods-XDCaptureService_Example"; 399 | target = 7C97A2036D3F606AEDD781E7B24A42B9 /* Pods-XDCaptureService_Example */; 400 | targetProxy = 4DA353F5D76233A2CAE601D41E29B3E2 /* PBXContainerItemProxy */; 401 | }; 402 | /* End PBXTargetDependency section */ 403 | 404 | /* Begin XCBuildConfiguration section */ 405 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | ALWAYS_SEARCH_USER_PATHS = NO; 409 | CLANG_ANALYZER_NONNULL = YES; 410 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 412 | CLANG_CXX_LIBRARY = "libc++"; 413 | CLANG_ENABLE_MODULES = YES; 414 | CLANG_ENABLE_OBJC_ARC = YES; 415 | CLANG_ENABLE_OBJC_WEAK = YES; 416 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 417 | CLANG_WARN_BOOL_CONVERSION = YES; 418 | CLANG_WARN_COMMA = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 422 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 423 | CLANG_WARN_EMPTY_BODY = YES; 424 | CLANG_WARN_ENUM_CONVERSION = YES; 425 | CLANG_WARN_INFINITE_RECURSION = YES; 426 | CLANG_WARN_INT_CONVERSION = YES; 427 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 428 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 429 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 431 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 432 | CLANG_WARN_STRICT_PROTOTYPES = YES; 433 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 434 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 435 | CLANG_WARN_UNREACHABLE_CODE = YES; 436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 437 | CODE_SIGNING_ALLOWED = NO; 438 | CODE_SIGNING_REQUIRED = NO; 439 | COPY_PHASE_STRIP = NO; 440 | DEBUG_INFORMATION_FORMAT = dwarf; 441 | ENABLE_STRICT_OBJC_MSGSEND = YES; 442 | ENABLE_TESTABILITY = YES; 443 | GCC_C_LANGUAGE_STANDARD = gnu11; 444 | GCC_DYNAMIC_NO_PIC = NO; 445 | GCC_NO_COMMON_BLOCKS = YES; 446 | GCC_OPTIMIZATION_LEVEL = 0; 447 | GCC_PREPROCESSOR_DEFINITIONS = ( 448 | "POD_CONFIGURATION_DEBUG=1", 449 | "DEBUG=1", 450 | "$(inherited)", 451 | ); 452 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 453 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 454 | GCC_WARN_UNDECLARED_SELECTOR = YES; 455 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 456 | GCC_WARN_UNUSED_FUNCTION = YES; 457 | GCC_WARN_UNUSED_VARIABLE = YES; 458 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 459 | MTL_ENABLE_DEBUG_INFO = YES; 460 | ONLY_ACTIVE_ARCH = YES; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | STRIP_INSTALLED_PRODUCT = NO; 463 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 464 | SYMROOT = "${SRCROOT}/../build"; 465 | }; 466 | name = Debug; 467 | }; 468 | 3A557D979C60B442C9644AACE0DAA579 /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | baseConfigurationReference = F9032F9EC64A65F4A1F601C592C5B6E5 /* Pods-XDCaptureService_Tests.debug.xcconfig */; 471 | buildSettings = { 472 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 473 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; 474 | CODE_SIGN_IDENTITY = ""; 475 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 476 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 477 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 478 | CURRENT_PROJECT_VERSION = 1; 479 | DEFINES_MODULE = YES; 480 | DYLIB_COMPATIBILITY_VERSION = 1; 481 | DYLIB_CURRENT_VERSION = 1; 482 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 483 | INFOPLIST_FILE = "Target Support Files/Pods-XDCaptureService_Tests/Info.plist"; 484 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 485 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 487 | MACH_O_TYPE = staticlib; 488 | MODULEMAP_FILE = "Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests.modulemap"; 489 | OTHER_LDFLAGS = ""; 490 | OTHER_LIBTOOLFLAGS = ""; 491 | PODS_ROOT = "$(SRCROOT)"; 492 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 493 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 494 | SDKROOT = iphoneos; 495 | SKIP_INSTALL = YES; 496 | TARGETED_DEVICE_FAMILY = "1,2"; 497 | VERSIONING_SYSTEM = "apple-generic"; 498 | VERSION_INFO_PREFIX = ""; 499 | }; 500 | name = Debug; 501 | }; 502 | 3C08FA2F88E21BA6F062C246087DC72E /* Release */ = { 503 | isa = XCBuildConfiguration; 504 | baseConfigurationReference = 4336E0B82A8F2286A2E9EA6E44DC38C5 /* Pods-XDCaptureService_Tests.release.xcconfig */; 505 | buildSettings = { 506 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 507 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; 508 | CODE_SIGN_IDENTITY = ""; 509 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 510 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 511 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 512 | CURRENT_PROJECT_VERSION = 1; 513 | DEFINES_MODULE = YES; 514 | DYLIB_COMPATIBILITY_VERSION = 1; 515 | DYLIB_CURRENT_VERSION = 1; 516 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 517 | INFOPLIST_FILE = "Target Support Files/Pods-XDCaptureService_Tests/Info.plist"; 518 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 519 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 521 | MACH_O_TYPE = staticlib; 522 | MODULEMAP_FILE = "Target Support Files/Pods-XDCaptureService_Tests/Pods-XDCaptureService_Tests.modulemap"; 523 | OTHER_LDFLAGS = ""; 524 | OTHER_LIBTOOLFLAGS = ""; 525 | PODS_ROOT = "$(SRCROOT)"; 526 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 527 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 528 | SDKROOT = iphoneos; 529 | SKIP_INSTALL = YES; 530 | TARGETED_DEVICE_FAMILY = "1,2"; 531 | VALIDATE_PRODUCT = YES; 532 | VERSIONING_SYSTEM = "apple-generic"; 533 | VERSION_INFO_PREFIX = ""; 534 | }; 535 | name = Release; 536 | }; 537 | 53EFDA64A16657CC8B7EBBBADD44F1FC /* Debug */ = { 538 | isa = XCBuildConfiguration; 539 | baseConfigurationReference = 15EF8094B961CDAD6B0225C4210D42E1 /* Pods-XDCaptureService_Example.debug.xcconfig */; 540 | buildSettings = { 541 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 542 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; 543 | CODE_SIGN_IDENTITY = ""; 544 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 545 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 546 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 547 | CURRENT_PROJECT_VERSION = 1; 548 | DEFINES_MODULE = YES; 549 | DYLIB_COMPATIBILITY_VERSION = 1; 550 | DYLIB_CURRENT_VERSION = 1; 551 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 552 | INFOPLIST_FILE = "Target Support Files/Pods-XDCaptureService_Example/Info.plist"; 553 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 554 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 555 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 556 | MACH_O_TYPE = staticlib; 557 | MODULEMAP_FILE = "Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example.modulemap"; 558 | OTHER_LDFLAGS = ""; 559 | OTHER_LIBTOOLFLAGS = ""; 560 | PODS_ROOT = "$(SRCROOT)"; 561 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 562 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 563 | SDKROOT = iphoneos; 564 | SKIP_INSTALL = YES; 565 | TARGETED_DEVICE_FAMILY = "1,2"; 566 | VERSIONING_SYSTEM = "apple-generic"; 567 | VERSION_INFO_PREFIX = ""; 568 | }; 569 | name = Debug; 570 | }; 571 | A0A652D2D8282099DD11CAEFA4821E01 /* Debug */ = { 572 | isa = XCBuildConfiguration; 573 | baseConfigurationReference = F4F7433183BA9077C5CD38C83A64D34D /* XDCaptureService.xcconfig */; 574 | buildSettings = { 575 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; 576 | CODE_SIGN_IDENTITY = ""; 577 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 578 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 579 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 580 | CURRENT_PROJECT_VERSION = 1; 581 | DEFINES_MODULE = YES; 582 | DYLIB_COMPATIBILITY_VERSION = 1; 583 | DYLIB_CURRENT_VERSION = 1; 584 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 585 | GCC_PREFIX_HEADER = "Target Support Files/XDCaptureService/XDCaptureService-prefix.pch"; 586 | INFOPLIST_FILE = "Target Support Files/XDCaptureService/Info.plist"; 587 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 588 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 589 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 590 | MODULEMAP_FILE = "Target Support Files/XDCaptureService/XDCaptureService.modulemap"; 591 | PRODUCT_MODULE_NAME = XDCaptureService; 592 | PRODUCT_NAME = XDCaptureService; 593 | SDKROOT = iphoneos; 594 | SKIP_INSTALL = YES; 595 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 596 | TARGETED_DEVICE_FAMILY = "1,2"; 597 | VERSIONING_SYSTEM = "apple-generic"; 598 | VERSION_INFO_PREFIX = ""; 599 | }; 600 | name = Debug; 601 | }; 602 | ACF4EAF9B3A528DADDEA06F4DDB54F4F /* Release */ = { 603 | isa = XCBuildConfiguration; 604 | baseConfigurationReference = F4F7433183BA9077C5CD38C83A64D34D /* XDCaptureService.xcconfig */; 605 | buildSettings = { 606 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; 607 | CODE_SIGN_IDENTITY = ""; 608 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 609 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 610 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 611 | CURRENT_PROJECT_VERSION = 1; 612 | DEFINES_MODULE = YES; 613 | DYLIB_COMPATIBILITY_VERSION = 1; 614 | DYLIB_CURRENT_VERSION = 1; 615 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 616 | GCC_PREFIX_HEADER = "Target Support Files/XDCaptureService/XDCaptureService-prefix.pch"; 617 | INFOPLIST_FILE = "Target Support Files/XDCaptureService/Info.plist"; 618 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 619 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 620 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 621 | MODULEMAP_FILE = "Target Support Files/XDCaptureService/XDCaptureService.modulemap"; 622 | PRODUCT_MODULE_NAME = XDCaptureService; 623 | PRODUCT_NAME = XDCaptureService; 624 | SDKROOT = iphoneos; 625 | SKIP_INSTALL = YES; 626 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 627 | TARGETED_DEVICE_FAMILY = "1,2"; 628 | VALIDATE_PRODUCT = YES; 629 | VERSIONING_SYSTEM = "apple-generic"; 630 | VERSION_INFO_PREFIX = ""; 631 | }; 632 | name = Release; 633 | }; 634 | F4568DEE257655D290C2B9CEAB37C934 /* Release */ = { 635 | isa = XCBuildConfiguration; 636 | buildSettings = { 637 | ALWAYS_SEARCH_USER_PATHS = NO; 638 | CLANG_ANALYZER_NONNULL = YES; 639 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 640 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 641 | CLANG_CXX_LIBRARY = "libc++"; 642 | CLANG_ENABLE_MODULES = YES; 643 | CLANG_ENABLE_OBJC_ARC = YES; 644 | CLANG_ENABLE_OBJC_WEAK = YES; 645 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 646 | CLANG_WARN_BOOL_CONVERSION = YES; 647 | CLANG_WARN_COMMA = YES; 648 | CLANG_WARN_CONSTANT_CONVERSION = YES; 649 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 650 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 651 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 652 | CLANG_WARN_EMPTY_BODY = YES; 653 | CLANG_WARN_ENUM_CONVERSION = YES; 654 | CLANG_WARN_INFINITE_RECURSION = YES; 655 | CLANG_WARN_INT_CONVERSION = YES; 656 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 657 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 658 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 659 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 660 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 661 | CLANG_WARN_STRICT_PROTOTYPES = YES; 662 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 663 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 664 | CLANG_WARN_UNREACHABLE_CODE = YES; 665 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 666 | CODE_SIGNING_ALLOWED = NO; 667 | CODE_SIGNING_REQUIRED = NO; 668 | COPY_PHASE_STRIP = NO; 669 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 670 | ENABLE_NS_ASSERTIONS = NO; 671 | ENABLE_STRICT_OBJC_MSGSEND = YES; 672 | GCC_C_LANGUAGE_STANDARD = gnu11; 673 | GCC_NO_COMMON_BLOCKS = YES; 674 | GCC_PREPROCESSOR_DEFINITIONS = ( 675 | "POD_CONFIGURATION_RELEASE=1", 676 | "$(inherited)", 677 | ); 678 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 679 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 680 | GCC_WARN_UNDECLARED_SELECTOR = YES; 681 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 682 | GCC_WARN_UNUSED_FUNCTION = YES; 683 | GCC_WARN_UNUSED_VARIABLE = YES; 684 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 685 | MTL_ENABLE_DEBUG_INFO = NO; 686 | PRODUCT_NAME = "$(TARGET_NAME)"; 687 | STRIP_INSTALLED_PRODUCT = NO; 688 | SYMROOT = "${SRCROOT}/../build"; 689 | }; 690 | name = Release; 691 | }; 692 | FD272FF8CE2BCB0E93557CD570D6FEC3 /* Release */ = { 693 | isa = XCBuildConfiguration; 694 | baseConfigurationReference = 893844150C2D1D243700F333F37501B9 /* Pods-XDCaptureService_Example.release.xcconfig */; 695 | buildSettings = { 696 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 697 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = NO; 698 | CODE_SIGN_IDENTITY = ""; 699 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 700 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 701 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 702 | CURRENT_PROJECT_VERSION = 1; 703 | DEFINES_MODULE = YES; 704 | DYLIB_COMPATIBILITY_VERSION = 1; 705 | DYLIB_CURRENT_VERSION = 1; 706 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 707 | INFOPLIST_FILE = "Target Support Files/Pods-XDCaptureService_Example/Info.plist"; 708 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 709 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 710 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 711 | MACH_O_TYPE = staticlib; 712 | MODULEMAP_FILE = "Target Support Files/Pods-XDCaptureService_Example/Pods-XDCaptureService_Example.modulemap"; 713 | OTHER_LDFLAGS = ""; 714 | OTHER_LIBTOOLFLAGS = ""; 715 | PODS_ROOT = "$(SRCROOT)"; 716 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 717 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 718 | SDKROOT = iphoneos; 719 | SKIP_INSTALL = YES; 720 | TARGETED_DEVICE_FAMILY = "1,2"; 721 | VALIDATE_PRODUCT = YES; 722 | VERSIONING_SYSTEM = "apple-generic"; 723 | VERSION_INFO_PREFIX = ""; 724 | }; 725 | name = Release; 726 | }; 727 | /* End XCBuildConfiguration section */ 728 | 729 | /* Begin XCConfigurationList section */ 730 | 1ECC837F07209EBB3EC18012E63E3F6B /* Build configuration list for PBXNativeTarget "Pods-XDCaptureService_Example" */ = { 731 | isa = XCConfigurationList; 732 | buildConfigurations = ( 733 | 53EFDA64A16657CC8B7EBBBADD44F1FC /* Debug */, 734 | FD272FF8CE2BCB0E93557CD570D6FEC3 /* Release */, 735 | ); 736 | defaultConfigurationIsVisible = 0; 737 | defaultConfigurationName = Release; 738 | }; 739 | 1EFF55E326468E35BE5D115F1F9F8239 /* Build configuration list for PBXNativeTarget "Pods-XDCaptureService_Tests" */ = { 740 | isa = XCConfigurationList; 741 | buildConfigurations = ( 742 | 3A557D979C60B442C9644AACE0DAA579 /* Debug */, 743 | 3C08FA2F88E21BA6F062C246087DC72E /* Release */, 744 | ); 745 | defaultConfigurationIsVisible = 0; 746 | defaultConfigurationName = Release; 747 | }; 748 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 749 | isa = XCConfigurationList; 750 | buildConfigurations = ( 751 | 1EE19F5DD95931924296F637BF18BD8F /* Debug */, 752 | F4568DEE257655D290C2B9CEAB37C934 /* Release */, 753 | ); 754 | defaultConfigurationIsVisible = 0; 755 | defaultConfigurationName = Release; 756 | }; 757 | 3C091AF431F19CDE24D54D65E820402E /* Build configuration list for PBXNativeTarget "XDCaptureService" */ = { 758 | isa = XCConfigurationList; 759 | buildConfigurations = ( 760 | A0A652D2D8282099DD11CAEFA4821E01 /* Debug */, 761 | ACF4EAF9B3A528DADDEA06F4DDB54F4F /* Release */, 762 | ); 763 | defaultConfigurationIsVisible = 0; 764 | defaultConfigurationName = Release; 765 | }; 766 | /* End XCConfigurationList section */ 767 | }; 768 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 769 | } 770 | --------------------------------------------------------------------------------