From 0d193b1e9ff980389ec6f1e38f0809dac8da20d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Torr=C3=A3o?= Date: Tue, 31 Mar 2020 11:13:33 +0100 Subject: [PATCH] 5.0.0 --- .swift-version | 1 - .../contents.xcworkspacedata | 2 +- CHANGELOG.md | 67 +- CameraManager.podspec | 9 +- .../project.pbxproj | 79 ++- .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../xcschemes/CameraManager.xcscheme | 12 +- .../xcshareddata}/xcschemes/camera.xcscheme | 55 +- {camera => Example App}/AppDelegate.swift | 0 .../Base.lproj/LaunchScreen.xib | 12 +- .../Base.lproj/Main.storyboard | 0 .../ImageViewController.swift | 0 .../AppIcon.appiconset/Contents.json | 223 +++--- .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin .../AppIcon.appiconset/Icon-App-57x57@1x.png | Bin .../AppIcon.appiconset/Icon-App-57x57@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin .../AppIcon.appiconset/Icon-App-72x72@1x.png | Bin .../AppIcon.appiconset/Icon-App-72x72@2x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin .../Icon-App-83.5x83.5@2x.png | Bin .../Icon-Small-50x50@1x.png | Bin .../Icon-Small-50x50@2x.png | Bin .../AppIcon.appiconset/copy.png | Bin .../AppIcon.appiconset/imaginary copy 2-1.png | Bin .../AppIcon.appiconset/imaginary copy 2-2.png | Bin .../AppIcon.appiconset/imaginary copy 2-3.png | Bin .../AppIcon.appiconset/imaginary copy 2-4.png | Bin .../AppIcon.appiconset/imaginary copy 2.png | Bin .../AppIcon.appiconset/imaginary copy-1.png | Bin .../AppIcon.appiconset/imaginary copy.png | Bin .../AppIcon.appiconset/logo.jpeg | Bin .../Images.xcassets/Contents.json | 0 .../flash_auto.imageset/Contents.json | 0 .../flash_auto.imageset/flash-auto.png | Bin .../flash_off.imageset/Contents.json | 0 .../flash_off.imageset/flash-off.png | Bin .../flash_on.imageset/Contents.json | 0 .../flash_on.imageset/flash-on.png | Bin .../logo.imageset/Contents.json | 0 .../logo.imageset/imaginary-1.png | Bin .../logo.imageset/imaginary-2.png | Bin .../logo.imageset/imaginary.png | Bin .../output_image.imageset/Contents.json | 0 .../output_image.imageset/output-image.png | Bin .../output_video.imageset/Contents.json | 0 .../icons8-video-call.png | Bin .../switch_camera.imageset/Contents.json | 0 .../switch_camera.imageset/switch-camera.png | Bin {camera => Example App}/Info.plist | 2 +- {camera => Example App}/ViewController.swift | 0 Package.swift | 28 +- README.md | 12 +- {CameraManager => Sources}/CameraManager.h | 0 {camera => Sources}/CameraManager.swift | 20 +- {CameraManager => Sources}/Info.plist | 0 .../xcshareddata/camera.xccheckout | 41 -- .../UserInterfaceState.xcuserstate | Bin 67606 -> 0 bytes .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 - .../xcschemes/xcschememanagement.plist | 37 - .../CameraManager.swift.qlpreview/Preview.txt | 653 ------------------ .../PreviewProperties.plist | 8 - 73 files changed, 293 insertions(+), 980 deletions(-) delete mode 100644 .swift-version rename {camera.xcodeproj/project.xcworkspace => .swiftpm/xcode/package.xcworkspace}/contents.xcworkspacedata (72%) rename {camera.xcodeproj => CameraManager.xcodeproj}/project.pbxproj (93%) create mode 100644 CameraManager.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename {camera.xcodeproj => CameraManager.xcodeproj}/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {camera.xcodeproj => CameraManager.xcodeproj}/xcshareddata/xcschemes/CameraManager.xcscheme (88%) rename {camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad => CameraManager.xcodeproj/xcshareddata}/xcschemes/camera.xcscheme (58%) rename {camera => Example App}/AppDelegate.swift (100%) rename {camera => Example App}/Base.lproj/LaunchScreen.xib (89%) rename {camera => Example App}/Base.lproj/Main.storyboard (100%) rename {camera => Example App}/ImageViewController.swift (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Contents.json (64%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/copy.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/imaginary copy 2-1.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/imaginary copy 2-2.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/imaginary copy 2-3.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/imaginary copy 2-4.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/imaginary copy 2.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/imaginary copy-1.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/imaginary copy.png (100%) rename {camera => Example App}/Images.xcassets/AppIcon.appiconset/logo.jpeg (100%) rename {camera => Example App}/Images.xcassets/Contents.json (100%) rename {camera => Example App}/Images.xcassets/flash_auto.imageset/Contents.json (100%) rename {camera => Example App}/Images.xcassets/flash_auto.imageset/flash-auto.png (100%) rename {camera => Example App}/Images.xcassets/flash_off.imageset/Contents.json (100%) rename {camera => Example App}/Images.xcassets/flash_off.imageset/flash-off.png (100%) rename {camera => Example App}/Images.xcassets/flash_on.imageset/Contents.json (100%) rename {camera => Example App}/Images.xcassets/flash_on.imageset/flash-on.png (100%) rename {camera => Example App}/Images.xcassets/logo.imageset/Contents.json (100%) rename {camera => Example App}/Images.xcassets/logo.imageset/imaginary-1.png (100%) rename {camera => Example App}/Images.xcassets/logo.imageset/imaginary-2.png (100%) rename {camera => Example App}/Images.xcassets/logo.imageset/imaginary.png (100%) rename {camera => Example App}/Images.xcassets/output_image.imageset/Contents.json (100%) rename {camera => Example App}/Images.xcassets/output_image.imageset/output-image.png (100%) rename {camera => Example App}/Images.xcassets/output_video.imageset/Contents.json (100%) rename {camera => Example App}/Images.xcassets/output_video.imageset/icons8-video-call.png (100%) rename {camera => Example App}/Images.xcassets/switch_camera.imageset/Contents.json (100%) rename {camera => Example App}/Images.xcassets/switch_camera.imageset/switch-camera.png (100%) rename {camera => Example App}/Info.plist (98%) rename {camera => Example App}/ViewController.swift (100%) rename {CameraManager => Sources}/CameraManager.h (100%) rename {camera => Sources}/CameraManager.swift (99%) rename {CameraManager => Sources}/Info.plist (100%) delete mode 100644 camera.xcodeproj/project.xcworkspace/xcshareddata/camera.xccheckout delete mode 100644 camera.xcodeproj/project.xcworkspace/xcuserdata/nataliaterlecka.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist delete mode 100644 camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 camera/CameraManager.swift.qlpreview/Preview.txt delete mode 100644 camera/CameraManager.swift.qlpreview/PreviewProperties.plist diff --git a/.swift-version b/.swift-version deleted file mode 100644 index bf77d54..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.2 diff --git a/camera.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata similarity index 72% rename from camera.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata index 0c81108..919434a 100644 --- a/camera.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/CHANGELOG.md b/CHANGELOG.md index 75f48f7..07d375e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,39 @@ # Change Log + All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [5.0.0](https://github.com/imaginary-cloud/CameraManager/tree/5.0.0) - 2020-03-31 + +### Changed + +- Syntax update for Swift 5.2 (issue #189) + +### Fixed + +- Fix Swift Package Manager support (issue #215) + ## [4.4.0](https://github.com/imaginary-cloud/CameraManager/tree/4.4.0) - 2019-03-12 + ### Changed + - Change callbacks to the swifty way of reporting success and errors (pull request #185) ## [4.3.1](https://github.com/imaginary-cloud/CameraManager/tree/4.3.1) - 2019-03-08 + ### Fixed - Swift Support (pull request #173 and #168) - Example App layout supports iPhone X (pull request #173) ## [4.3.0](https://github.com/imaginary-cloud/CameraManager/tree/4.3.0) - 2018-08-17 + ### Added - Add video stabilization mode (pull request #160) ## [4.2.3](https://github.com/imaginary-cloud/CameraManager/tree/4.2.3) - 2018-07-27 + ### Fixed - Deinit cause crash when `cameraDevice = .front` (#157) @@ -27,6 +43,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add note to documentation when a property has a default value ## [4.2.2](https://github.com/imaginary-cloud/CameraManager/tree/4.2.2) - 2018-07-26 + ### Added - Add `CONTRIBUTING.md` @@ -35,8 +52,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - When recording is finished `videoURL` is always nil (#158) - ## [4.2.1](https://github.com/imaginary-cloud/CameraManager/tree/4.2.1) - 2018-06-20 + ### Added - Add `CODE_OF_CONDUCT.md` @@ -46,6 +63,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fix flash for video (#152) ## [4.2.0](https://github.com/imaginary-cloud/CameraManager/tree/4.2.0) - 2018-06-19 + ### Added - Add properties for setting custom album names for image and video recordings (pull request #147) @@ -58,11 +76,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Memory leak in Example App ## [4.1.1](https://github.com/imaginary-cloud/CameraManager/tree/4.1.1) - 2018-05-16 + ### Fixed - License ## [4.1.0](https://github.com/imaginary-cloud/CameraManager/tree/4.1.0) - 2018-05-15 + ### Added - Add EXIF metadata for images and video - including location (#131) @@ -71,10 +91,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fix Crash (pull request #141) -- Fix image orientation when taking pictures with device rotation lock active +- Fix image orientation when taking pictures with device rotation lock active ## [4.0.2](https://github.com/imaginary-cloud/CameraManager/tree/4.0.2) - 2018-05-07 -### Fixed + +### Fixed - Using CoreMotion to get real device orientation, fixing no sound when switching camera (pull request #134) - Fixed take picture on iPad with front camera(landscape, UpsideDown… (pull request #139) @@ -88,15 +109,17 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Repeat crash CameraManager.swift line 430 in release (issue #138) ## [4.0.1](https://github.com/imaginary-cloud/CameraManager/tree/4.0.1) - 2017-11-18 + ### Added - Add @discardableResult modifiers to addPreviewLayerToView (pull request #132) -### Fixed +### Fixed - Fix shouldEnableTapToFocus function (pull request #133) ## [4.0.0](https://github.com/imaginary-cloud/CameraManager/tree/4.0.0) - 2017-10-22 + ### Changed - Syntax update for Swift 4.0 (pull request #125) @@ -106,12 +129,14 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add gesture recognizers on the main thread (pull request #123) ## [3.2.0](https://github.com/imaginary-cloud/CameraManager/tree/3.2.0) - 2017-07-03 + ### Added - Add location data to videos (pull request #110) - Optional location permissions (pull request #110) ## [3.1.4](https://github.com/imaginary-cloud/CameraManager/tree/3.1.4) - 2017-06-14 + ### Added - Add properties `focusMode` and `exposureMode` (pull request #106) @@ -124,33 +149,39 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Getting same video URL, when simultaneously recording video (issue #108) ## [3.1.3](https://github.com/imaginary-cloud/CameraManager/tree/3.1.3) - 2017-05-15 + ### Added - Add two new properties `shouldEnableTapToFocus` and `shouldEnablePinchToZoom` (pull request #106) ## [3.1.2](https://github.com/imaginary-cloud/CameraManager/tree/3.1.2) - 2017-05-02 + ### Changed - New option to flip image took by front camera (pull request #104) - Fixes possible hang after requesting permission (pull request #98) ## [3.1.1](https://github.com/imaginary-cloud/CameraManager/tree/3.1.1) - 2017-03-15 + ### Changed - Refactor to avoid implicit unwrapped optionals (pull request #94) ## [3.1.0](https://github.com/imaginary-cloud/CameraManager/tree/3.1.0) - 2017-02-11 + ### Added - Flip animation and tap to focus (pull request #72) - Icons and splash image to example ## [3.0.0](https://github.com/imaginary-cloud/CameraManager/tree/3.0.0) - 2016-09-16 + ### Changed - Syntax update for Swift 3.0. ## [2.2.4](https://github.com/imaginary-cloud/CameraManager/tree/2.2.4) - 2016-07-06 + ### Added - Add error checking. @@ -160,6 +191,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixes completion typos and suggests renamed functions. ## [2.2.3](https://github.com/imaginary-cloud/CameraManager/tree/2.2.3) - 2016-05-12 + ### Changed - Fixed zoom in StillImage Mode. @@ -167,16 +199,19 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Minor refactoring ## [2.2.2](https://github.com/imaginary-cloud/CameraManager/tree/2.2.2) - 2016-03-07 + ### Added - `CHANGELOG.md` file. ## [2.2.1](https://github.com/imaginary-cloud/CameraManager/tree/2.2.1) - 2016-03-02 + ### Added - Initial support for the Swift Package Manager. ## [2.2.0](https://github.com/imaginary-cloud/CameraManager/tree/2.2.0) - 2016-02-19 + ### Added - Zoom support. @@ -186,6 +221,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixed spelling of `embeddingView`. ## [2.1.3](https://github.com/imaginary-cloud/CameraManager/tree/2.1.3) - 2016-01-08 + ### Changed - No sound in video with more than 10 seconds fixed. @@ -193,6 +229,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixed `NewCameraOutputMode` not passed during init. ## [2.1.2](https://github.com/imaginary-cloud/CameraManager/tree/2.1.2) - 2015-12-24 + ### Added - Property `cameraIsReady`. @@ -200,36 +237,43 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Completion block `addPreviewLayerToView`. ## [2.1.1](https://github.com/imaginary-cloud/CameraManager/tree/2.1.1) - 2015-12-11 + ### Added - Ability to disable responding to device orientation changes. ## [2.1.0](https://github.com/imaginary-cloud/CameraManager/tree/2.1) - 2015-11-20 + ### Added - Properties `recordedDuration` and `recordedFileSize`. ## [2.0.2](https://github.com/imaginary-cloud/CameraManager/tree/2.0.2) - 2015-11-17 + ### Fixed - iOS 9.0.1 bug. ## [2.0.1](https://github.com/imaginary-cloud/CameraManager/tree/2.0.1) - 2015-09-17 + ### Changed - Syntax updates. ## [2.0.0](https://github.com/imaginary-cloud/CameraManager/tree/2.0.0) - 2015-07-30 + ### Changed - Syntax update for Swift 2.0. ## [1.0.14](https://github.com/imaginary-cloud/CameraManager/tree/1.0.14) - 2015-07-17 + ### Changed - Small fixes. ## [1.0.13](https://github.com/imaginary-cloud/CameraManager/tree/1.0.13) - 2015-05-12 + ### Added - Support for installing via Carthage. @@ -241,6 +285,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Syntax update for Swift 1.2. ## [1.0.12](https://github.com/imaginary-cloud/CameraManager/tree/1.0.12) - 2015-03-23 + ### Added - Incremental flash mode. @@ -254,6 +299,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - `README.md` update. ## [1.0.11](https://github.com/imaginary-cloud/CameraManager/tree/1.0.11) - 2015-03-20 + ### Added - Property `showAccessPermissionPopupAutomatically`, to determine if you want the user to be asked about camera permissions automatically or manually. @@ -261,6 +307,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Error handling in capture completion blocks. ## [1.0.10](https://github.com/imaginary-cloud/CameraManager/tree/1.0.10) - 2015-03-19 + ### Added - Camera state returned when adding the preview layer. @@ -270,11 +317,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). - `README.md` update. ## [1.0.9](https://github.com/imaginary-cloud/CameraManager/tree/1.0.9) - 2015-03-10 + ### Changed - CameraManager class made public. ## [1.0.8](https://github.com/imaginary-cloud/CameraManager/tree/1.0.8) - 2015-02-24 + ### Fixed - Wrong orientation when camera preview starts in landscape mode. @@ -286,6 +335,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Bug which prevented from recording audio. ## [1.0.7](https://github.com/imaginary-cloud/CameraManager/tree/1.0.7) - 2014-10-30 + ### Added - Version compatible with XCode 6.1. @@ -297,6 +347,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Swift syntax updates to resolve compile errors. ## [1.0.6](https://github.com/imaginary-cloud/CameraManager/tree/1.0.6) - 2014-10-28 + ### Added - Check for valid capture session. @@ -306,6 +357,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fixed video orientation change. ## [1.0.5](https://github.com/imaginary-cloud/CameraManager/tree/1.0.5) - 2014-10-22 + ### Changed - Enhanced Camera lifecyle. @@ -313,6 +365,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Orientation observers only added if needed. ## [1.0.4](https://github.com/imaginary-cloud/CameraManager/tree/1.0.4) - 2014-10-16 + ### Added - Restart session. @@ -322,9 +375,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). - `README.md` update. ## [1.0.3](https://github.com/imaginary-cloud/CameraManager/tree/1.0.3) - 2014-10-15 + ### Added -- Property `writeFilesToPhoneLibrary` to conditionally write to user library. +- Property `writeFilesToPhoneLibrary` to conditionally write to user library. ### Changed @@ -333,16 +387,19 @@ This project adheres to [Semantic Versioning](http://semver.org/). - `README.md` update. ## [1.0.2](https://github.com/imaginary-cloud/CameraManager/tree/1.0.2) - 2014-10-15 + ### Added - `CameraManager.podspec` file. ## [1.0.1](https://github.com/imaginary-cloud/CameraManager/tree/1.0.1) - 2014-10-15 + ### Changed - Optional initializer for `addPreviewLayerToView`. ## [1.0.0](https://github.com/imaginary-cloud/CameraManager/tree/1.0.0) - 2014-10-15 + ### Added - Front and back camera selection. diff --git a/CameraManager.podspec b/CameraManager.podspec index cdbb1fa..909c11f 100644 --- a/CameraManager.podspec +++ b/CameraManager.podspec @@ -1,14 +1,15 @@ Pod::Spec.new do |s| s.name = "CameraManager" - s.version = "4.4.0" + s.version = "5.0.0" s.summary = "This is a simple Swift class to provide all the configurations you need to create custom camera view in your app. Just drag, drop and use." s.requires_arc = true s.homepage = "https://github.com/imaginary-cloud/CameraManager" s.license = 'MIT' s.author = { "torrao" => "rtorrao@imaginarycloud.com" } - s.source = { :git => "https://github.com/imaginary-cloud/CameraManager.git", :tag => "4.4.0" } + s.source = { :git => "https://github.com/imaginary-cloud/CameraManager.git", :tag => "5.0.0" } s.social_media_url = 'http://www.imaginarycloud.com/' s.platform = :ios, '9.0' - s.pod_target_xcconfig = { "SWIFT_VERSION" => "4.2" } - s.source_files = 'camera/CameraManager.swift' + s.pod_target_xcconfig = { "SWIFT_VERSION" => "5.2" } + s.swift_version = '5.2' + s.source_files = 'Sources/CameraManager.swift' end diff --git a/camera.xcodeproj/project.pbxproj b/CameraManager.xcodeproj/project.pbxproj similarity index 93% rename from camera.xcodeproj/project.pbxproj rename to CameraManager.xcodeproj/project.pbxproj index e7209fe..955715f 100644 --- a/camera.xcodeproj/project.pbxproj +++ b/CameraManager.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 02A8524E2433A7BC001F560A /* CameraManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454C1F6619E8316A00C81915 /* CameraManager.swift */; }; 454C1F4719E82E2500C81915 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454C1F4619E82E2500C81915 /* AppDelegate.swift */; }; 454C1F4919E82E2500C81915 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454C1F4819E82E2500C81915 /* ViewController.swift */; }; 454C1F4C19E82E2500C81915 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 454C1F4A19E82E2500C81915 /* Main.storyboard */; }; @@ -16,7 +17,6 @@ D71DE8861AD677A7001E62F1 /* CameraManager.h in Headers */ = {isa = PBXBuildFile; fileRef = D71DE8851AD677A7001E62F1 /* CameraManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; D71DE8981AD677A8001E62F1 /* CameraManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D71DE8811AD677A7001E62F1 /* CameraManager.framework */; }; D71DE8991AD677A8001E62F1 /* CameraManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D71DE8811AD677A7001E62F1 /* CameraManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - D71DE8A11AD677EF001E62F1 /* CameraManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454C1F6619E8316A00C81915 /* CameraManager.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -51,7 +51,7 @@ 454C1F4B19E82E2500C81915 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 454C1F4D19E82E2500C81915 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 454C1F5019E82E2500C81915 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 454C1F6619E8316A00C81915 /* CameraManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CameraManager.swift; path = ../camera/CameraManager.swift; sourceTree = ""; }; + 454C1F6619E8316A00C81915 /* CameraManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraManager.swift; sourceTree = ""; }; 45A23C171A656BDC00FB48F3 /* ImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageViewController.swift; sourceTree = ""; }; D71DE8811AD677A7001E62F1 /* CameraManager.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CameraManager.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D71DE8841AD677A7001E62F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -80,8 +80,8 @@ 454C1F3819E82E2500C81915 = { isa = PBXGroup; children = ( - 454C1F4319E82E2500C81915 /* camera */, - D71DE8821AD677A7001E62F1 /* CameraManager */, + 454C1F4319E82E2500C81915 /* Example App */, + D71DE8821AD677A7001E62F1 /* Sources */, 454C1F4219E82E2500C81915 /* Products */, ); sourceTree = ""; @@ -95,17 +95,18 @@ name = Products; sourceTree = ""; }; - 454C1F4319E82E2500C81915 /* camera */ = { + 454C1F4319E82E2500C81915 /* Example App */ = { isa = PBXGroup; children = ( 454C1F4619E82E2500C81915 /* AppDelegate.swift */, - 45A23C191A656BE600FB48F3 /* Example app view controllers */, - 454C1F4A19E82E2500C81915 /* Main.storyboard */, + 454C1F4819E82E2500C81915 /* ViewController.swift */, + 45A23C171A656BDC00FB48F3 /* ImageViewController.swift */, 454C1F4D19E82E2500C81915 /* Images.xcassets */, 454C1F4F19E82E2500C81915 /* LaunchScreen.xib */, + 454C1F4A19E82E2500C81915 /* Main.storyboard */, 454C1F4419E82E2500C81915 /* Supporting Files */, ); - path = camera; + path = "Example App"; sourceTree = ""; }; 454C1F4419E82E2500C81915 /* Supporting Files */ = { @@ -116,23 +117,14 @@ name = "Supporting Files"; sourceTree = ""; }; - 45A23C191A656BE600FB48F3 /* Example app view controllers */ = { - isa = PBXGroup; - children = ( - 454C1F4819E82E2500C81915 /* ViewController.swift */, - 45A23C171A656BDC00FB48F3 /* ImageViewController.swift */, - ); - name = "Example app view controllers"; - sourceTree = ""; - }; - D71DE8821AD677A7001E62F1 /* CameraManager */ = { + D71DE8821AD677A7001E62F1 /* Sources */ = { isa = PBXGroup; children = ( - D71DE8851AD677A7001E62F1 /* CameraManager.h */, 454C1F6619E8316A00C81915 /* CameraManager.swift */, + D71DE8851AD677A7001E62F1 /* CameraManager.h */, D71DE8831AD677A7001E62F1 /* Supporting Files */, ); - path = CameraManager; + path = Sources; sourceTree = ""; }; D71DE8831AD677A7001E62F1 /* Supporting Files */ = { @@ -201,23 +193,24 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1130; ORGANIZATIONNAME = imaginaryCloud; TargetAttributes = { 454C1F4019E82E2500C81915 = { CreatedOnToolsVersion = 6.0.1; - LastSwiftMigration = 1000; + DevelopmentTeam = QM7HJTY23M; + LastSwiftMigration = 1130; ProvisioningStyle = Automatic; }; D71DE8801AD677A7001E62F1 = { CreatedOnToolsVersion = 6.3; - LastSwiftMigration = 1000; + LastSwiftMigration = 1130; }; }; }; - buildConfigurationList = 454C1F3C19E82E2500C81915 /* Build configuration list for PBXProject "camera" */; + buildConfigurationList = 454C1F3C19E82E2500C81915 /* Build configuration list for PBXProject "CameraManager" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -269,7 +262,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D71DE8A11AD677EF001E62F1 /* CameraManager.swift in Sources */, + 02A8524E2433A7BC001F560A /* CameraManager.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -307,6 +300,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -355,7 +349,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -364,6 +358,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -403,7 +398,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -412,38 +407,42 @@ 454C1F6119E82E2500C81915 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = camera/Info.plist; + DEVELOPMENT_TEAM = QM7HJTY23M; + INFOPLIST_FILE = "Example App/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 5.0.0; PRODUCT_BUNDLE_IDENTIFIER = cameraDemo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; 454C1F6219E82E2500C81915 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + BUILD_LIBRARY_FOR_DISTRIBUTION = NO; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = QM7HJTY23M; INFOPLIST_FILE = camera/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 5.0.0; PRODUCT_BUNDLE_IDENTIFIER = cameraDemo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -462,7 +461,7 @@ "DEBUG=1", "$(inherited)", ); - INFOPLIST_FILE = CameraManager/Info.plist; + INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -470,7 +469,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -488,7 +487,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = CameraManager/Info.plist; + INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -496,7 +495,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -505,7 +504,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 454C1F3C19E82E2500C81915 /* Build configuration list for PBXProject "camera" */ = { + 454C1F3C19E82E2500C81915 /* Build configuration list for PBXProject "CameraManager" */ = { isa = XCConfigurationList; buildConfigurations = ( 454C1F5E19E82E2500C81915 /* Debug */, diff --git a/CameraManager.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/CameraManager.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0299296 --- /dev/null +++ b/CameraManager.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/camera.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/CameraManager.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from camera.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to CameraManager.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/camera.xcodeproj/xcshareddata/xcschemes/CameraManager.xcscheme b/CameraManager.xcodeproj/xcshareddata/xcschemes/CameraManager.xcscheme similarity index 88% rename from camera.xcodeproj/xcshareddata/xcschemes/CameraManager.xcscheme rename to CameraManager.xcodeproj/xcshareddata/xcschemes/CameraManager.xcscheme index 2e1bbc1..626f0e3 100644 --- a/camera.xcodeproj/xcshareddata/xcschemes/CameraManager.xcscheme +++ b/CameraManager.xcodeproj/xcshareddata/xcschemes/CameraManager.xcscheme @@ -1,6 +1,6 @@ + ReferencedContainer = "container:CameraManager.xcodeproj"> @@ -29,8 +29,6 @@ shouldUseLaunchSchemeArgsEnv = "YES"> - - + ReferencedContainer = "container:CameraManager.xcodeproj"> - - + ReferencedContainer = "container:CameraManager.xcodeproj"> diff --git a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/camera.xcscheme b/CameraManager.xcodeproj/xcshareddata/xcschemes/camera.xcscheme similarity index 58% rename from camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/camera.xcscheme rename to CameraManager.xcodeproj/xcshareddata/xcschemes/camera.xcscheme index 2fc0f4c..6810004 100644 --- a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/camera.xcscheme +++ b/CameraManager.xcodeproj/xcshareddata/xcschemes/camera.xcscheme @@ -1,6 +1,6 @@ - - - - + ReferencedContainer = "container:CameraManager.xcodeproj"> + shouldUseLaunchSchemeArgsEnv = "YES"> - - - - - - - - - - + ReferencedContainer = "container:CameraManager.xcodeproj"> - - @@ -101,7 +66,7 @@ BlueprintIdentifier = "454C1F4019E82E2500C81915" BuildableName = "camera.app" BlueprintName = "camera" - ReferencedContainer = "container:camera.xcodeproj"> + ReferencedContainer = "container:CameraManager.xcodeproj"> diff --git a/camera/AppDelegate.swift b/Example App/AppDelegate.swift similarity index 100% rename from camera/AppDelegate.swift rename to Example App/AppDelegate.swift diff --git a/camera/Base.lproj/LaunchScreen.xib b/Example App/Base.lproj/LaunchScreen.xib similarity index 89% rename from camera/Base.lproj/LaunchScreen.xib rename to Example App/Base.lproj/LaunchScreen.xib index 07cd041..f0cfedd 100644 --- a/camera/Base.lproj/LaunchScreen.xib +++ b/Example App/Base.lproj/LaunchScreen.xib @@ -1,11 +1,9 @@ - - - - + + - + @@ -15,7 +13,7 @@ - - + diff --git a/camera/Base.lproj/Main.storyboard b/Example App/Base.lproj/Main.storyboard similarity index 100% rename from camera/Base.lproj/Main.storyboard rename to Example App/Base.lproj/Main.storyboard diff --git a/camera/ImageViewController.swift b/Example App/ImageViewController.swift similarity index 100% rename from camera/ImageViewController.swift rename to Example App/ImageViewController.swift diff --git a/camera/Images.xcassets/AppIcon.appiconset/Contents.json b/Example App/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 64% rename from camera/Images.xcassets/AppIcon.appiconset/Contents.json rename to Example App/Images.xcassets/AppIcon.appiconset/Contents.json index 26b5f4b..310a43b 100644 --- a/camera/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example App/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,224 +1,245 @@ { "images" : [ { - "size" : "20x20", - "idiom" : "iphone", "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" }, { - "size" : "20x20", - "idiom" : "iphone", "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" }, { - "size" : "29x29", - "idiom" : "iphone", "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" + "idiom" : "iphone", + "scale" : "1x", + "size" : "29x29" }, { - "size" : "29x29", - "idiom" : "iphone", "filename" : "imaginary copy 2-4.png", - "scale" : "2x" + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" }, { - "size" : "29x29", - "idiom" : "iphone", "filename" : "imaginary copy 2-3.png", - "scale" : "3x" + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" }, { - "size" : "40x40", - "idiom" : "iphone", "filename" : "imaginary copy 2-2.png", - "scale" : "2x" + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" }, { - "size" : "40x40", - "idiom" : "iphone", "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" }, { - "size" : "57x57", - "idiom" : "iphone", "filename" : "Icon-App-57x57@1x.png", - "scale" : "1x" + "idiom" : "iphone", + "scale" : "1x", + "size" : "57x57" }, { - "size" : "57x57", - "idiom" : "iphone", "filename" : "Icon-App-57x57@2x.png", - "scale" : "2x" + "idiom" : "iphone", + "scale" : "2x", + "size" : "57x57" }, { - "size" : "60x60", - "idiom" : "iphone", "filename" : "imaginary copy 2-1.png", - "scale" : "2x" + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" }, { - "size" : "60x60", - "idiom" : "iphone", "filename" : "imaginary copy 2.png", - "scale" : "3x" + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" }, { - "size" : "20x20", - "idiom" : "ipad", "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { - "size" : "29x29", - "idiom" : "ipad", "filename" : "imaginary copy-1.png", - "scale" : "1x" + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" }, { - "size" : "29x29", - "idiom" : "ipad", "filename" : "imaginary copy.png", - "scale" : "2x" + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" }, { - "size" : "40x40", - "idiom" : "ipad", "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" }, { - "size" : "40x40", - "idiom" : "ipad", "filename" : "copy.png", - "scale" : "2x" + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" }, { - "size" : "50x50", - "idiom" : "ipad", "filename" : "Icon-Small-50x50@1x.png", - "scale" : "1x" + "idiom" : "ipad", + "scale" : "1x", + "size" : "50x50" }, { - "size" : "50x50", - "idiom" : "ipad", "filename" : "Icon-Small-50x50@2x.png", - "scale" : "2x" + "idiom" : "ipad", + "scale" : "2x", + "size" : "50x50" }, { - "size" : "72x72", - "idiom" : "ipad", "filename" : "Icon-App-72x72@1x.png", - "scale" : "1x" + "idiom" : "ipad", + "scale" : "1x", + "size" : "72x72" }, { - "size" : "72x72", - "idiom" : "ipad", "filename" : "Icon-App-72x72@2x.png", - "scale" : "2x" + "idiom" : "ipad", + "scale" : "2x", + "size" : "72x72" }, { - "size" : "76x76", - "idiom" : "ipad", "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" }, { - "size" : "76x76", - "idiom" : "ipad", "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" }, { - "size" : "83.5x83.5", - "idiom" : "ipad", "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" }, { - "size" : "1024x1024", - "idiom" : "ios-marketing", "filename" : "logo.jpeg", - "scale" : "1x" + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" }, { - "size" : "60x60", - "idiom" : "car", "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" + "idiom" : "car", + "scale" : "2x", + "size" : "60x60" }, { - "size" : "60x60", - "idiom" : "car", "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" + "idiom" : "car", + "scale" : "3x", + "size" : "60x60" }, { - "size" : "24x24", "idiom" : "watch", - "scale" : "2x", "role" : "notificationCenter", + "scale" : "2x", + "size" : "24x24", "subtype" : "38mm" }, { - "size" : "27.5x27.5", "idiom" : "watch", - "scale" : "2x", "role" : "notificationCenter", + "scale" : "2x", + "size" : "27.5x27.5", "subtype" : "42mm" }, { - "size" : "29x29", - "idiom" : "watch", "filename" : "Icon-App-29x29@2x.png", + "idiom" : "watch", "role" : "companionSettings", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { - "size" : "29x29", - "idiom" : "watch", "filename" : "Icon-App-29x29@3x.png", + "idiom" : "watch", "role" : "companionSettings", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { - "size" : "40x40", - "idiom" : "watch", "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x", + "idiom" : "watch", "role" : "appLauncher", + "scale" : "2x", + "size" : "40x40", "subtype" : "38mm" }, { - "size" : "86x86", "idiom" : "watch", + "role" : "appLauncher", "scale" : "2x", + "size" : "44x44", + "subtype" : "40mm" + }, + { + "idiom" : "watch", + "role" : "appLauncher", + "scale" : "2x", + "size" : "50x50", + "subtype" : "44mm" + }, + { + "idiom" : "watch", "role" : "quickLook", + "scale" : "2x", + "size" : "86x86", "subtype" : "38mm" }, { - "size" : "98x98", "idiom" : "watch", - "scale" : "2x", "role" : "quickLook", + "scale" : "2x", + "size" : "98x98", "subtype" : "42mm" }, + { + "idiom" : "watch", + "role" : "quickLook", + "scale" : "2x", + "size" : "108x108", + "subtype" : "44mm" + }, { "idiom" : "watch-marketing", - "size" : "1024x1024", - "scale" : "1x" + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png b/Example App/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png rename to Example App/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/copy.png b/Example App/Images.xcassets/AppIcon.appiconset/copy.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/copy.png rename to Example App/Images.xcassets/AppIcon.appiconset/copy.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-1.png b/Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-1.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-1.png rename to Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-1.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-2.png b/Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-2.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-2.png rename to Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-2.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-3.png b/Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-3.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-3.png rename to Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-3.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-4.png b/Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-4.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2-4.png rename to Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2-4.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2.png b/Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/imaginary copy 2.png rename to Example App/Images.xcassets/AppIcon.appiconset/imaginary copy 2.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/imaginary copy-1.png b/Example App/Images.xcassets/AppIcon.appiconset/imaginary copy-1.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/imaginary copy-1.png rename to Example App/Images.xcassets/AppIcon.appiconset/imaginary copy-1.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/imaginary copy.png b/Example App/Images.xcassets/AppIcon.appiconset/imaginary copy.png similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/imaginary copy.png rename to Example App/Images.xcassets/AppIcon.appiconset/imaginary copy.png diff --git a/camera/Images.xcassets/AppIcon.appiconset/logo.jpeg b/Example App/Images.xcassets/AppIcon.appiconset/logo.jpeg similarity index 100% rename from camera/Images.xcassets/AppIcon.appiconset/logo.jpeg rename to Example App/Images.xcassets/AppIcon.appiconset/logo.jpeg diff --git a/camera/Images.xcassets/Contents.json b/Example App/Images.xcassets/Contents.json similarity index 100% rename from camera/Images.xcassets/Contents.json rename to Example App/Images.xcassets/Contents.json diff --git a/camera/Images.xcassets/flash_auto.imageset/Contents.json b/Example App/Images.xcassets/flash_auto.imageset/Contents.json similarity index 100% rename from camera/Images.xcassets/flash_auto.imageset/Contents.json rename to Example App/Images.xcassets/flash_auto.imageset/Contents.json diff --git a/camera/Images.xcassets/flash_auto.imageset/flash-auto.png b/Example App/Images.xcassets/flash_auto.imageset/flash-auto.png similarity index 100% rename from camera/Images.xcassets/flash_auto.imageset/flash-auto.png rename to Example App/Images.xcassets/flash_auto.imageset/flash-auto.png diff --git a/camera/Images.xcassets/flash_off.imageset/Contents.json b/Example App/Images.xcassets/flash_off.imageset/Contents.json similarity index 100% rename from camera/Images.xcassets/flash_off.imageset/Contents.json rename to Example App/Images.xcassets/flash_off.imageset/Contents.json diff --git a/camera/Images.xcassets/flash_off.imageset/flash-off.png b/Example App/Images.xcassets/flash_off.imageset/flash-off.png similarity index 100% rename from camera/Images.xcassets/flash_off.imageset/flash-off.png rename to Example App/Images.xcassets/flash_off.imageset/flash-off.png diff --git a/camera/Images.xcassets/flash_on.imageset/Contents.json b/Example App/Images.xcassets/flash_on.imageset/Contents.json similarity index 100% rename from camera/Images.xcassets/flash_on.imageset/Contents.json rename to Example App/Images.xcassets/flash_on.imageset/Contents.json diff --git a/camera/Images.xcassets/flash_on.imageset/flash-on.png b/Example App/Images.xcassets/flash_on.imageset/flash-on.png similarity index 100% rename from camera/Images.xcassets/flash_on.imageset/flash-on.png rename to Example App/Images.xcassets/flash_on.imageset/flash-on.png diff --git a/camera/Images.xcassets/logo.imageset/Contents.json b/Example App/Images.xcassets/logo.imageset/Contents.json similarity index 100% rename from camera/Images.xcassets/logo.imageset/Contents.json rename to Example App/Images.xcassets/logo.imageset/Contents.json diff --git a/camera/Images.xcassets/logo.imageset/imaginary-1.png b/Example App/Images.xcassets/logo.imageset/imaginary-1.png similarity index 100% rename from camera/Images.xcassets/logo.imageset/imaginary-1.png rename to Example App/Images.xcassets/logo.imageset/imaginary-1.png diff --git a/camera/Images.xcassets/logo.imageset/imaginary-2.png b/Example App/Images.xcassets/logo.imageset/imaginary-2.png similarity index 100% rename from camera/Images.xcassets/logo.imageset/imaginary-2.png rename to Example App/Images.xcassets/logo.imageset/imaginary-2.png diff --git a/camera/Images.xcassets/logo.imageset/imaginary.png b/Example App/Images.xcassets/logo.imageset/imaginary.png similarity index 100% rename from camera/Images.xcassets/logo.imageset/imaginary.png rename to Example App/Images.xcassets/logo.imageset/imaginary.png diff --git a/camera/Images.xcassets/output_image.imageset/Contents.json b/Example App/Images.xcassets/output_image.imageset/Contents.json similarity index 100% rename from camera/Images.xcassets/output_image.imageset/Contents.json rename to Example App/Images.xcassets/output_image.imageset/Contents.json diff --git a/camera/Images.xcassets/output_image.imageset/output-image.png b/Example App/Images.xcassets/output_image.imageset/output-image.png similarity index 100% rename from camera/Images.xcassets/output_image.imageset/output-image.png rename to Example App/Images.xcassets/output_image.imageset/output-image.png diff --git a/camera/Images.xcassets/output_video.imageset/Contents.json b/Example App/Images.xcassets/output_video.imageset/Contents.json similarity index 100% rename from camera/Images.xcassets/output_video.imageset/Contents.json rename to Example App/Images.xcassets/output_video.imageset/Contents.json diff --git a/camera/Images.xcassets/output_video.imageset/icons8-video-call.png b/Example App/Images.xcassets/output_video.imageset/icons8-video-call.png similarity index 100% rename from camera/Images.xcassets/output_video.imageset/icons8-video-call.png rename to Example App/Images.xcassets/output_video.imageset/icons8-video-call.png diff --git a/camera/Images.xcassets/switch_camera.imageset/Contents.json b/Example App/Images.xcassets/switch_camera.imageset/Contents.json similarity index 100% rename from camera/Images.xcassets/switch_camera.imageset/Contents.json rename to Example App/Images.xcassets/switch_camera.imageset/Contents.json diff --git a/camera/Images.xcassets/switch_camera.imageset/switch-camera.png b/Example App/Images.xcassets/switch_camera.imageset/switch-camera.png similarity index 100% rename from camera/Images.xcassets/switch_camera.imageset/switch-camera.png rename to Example App/Images.xcassets/switch_camera.imageset/switch-camera.png diff --git a/camera/Info.plist b/Example App/Info.plist similarity index 98% rename from camera/Info.plist rename to Example App/Info.plist index 55b3e15..2abba27 100644 --- a/camera/Info.plist +++ b/Example App/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.1.0 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion diff --git a/camera/ViewController.swift b/Example App/ViewController.swift similarity index 100% rename from camera/ViewController.swift rename to Example App/ViewController.swift diff --git a/Package.swift b/Package.swift index 728e2a3..5bdc193 100644 --- a/Package.swift +++ b/Package.swift @@ -1,12 +1,26 @@ -// Package.swift -// -// Copyright © 2017 ImaginaryCloud, imaginarycloud.com. This library is licensed under the MIT license. +// swift-tools-version:5.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( - name: "CameraManager", - targets: [ - Target(name: "camera", dependencies: [.Target(name: "CameraManager")]) - ] + name: "CameraManager", + platforms: [ + .iOS(.v10) + ], + products: [ + .library( + name: "CameraManager", + targets: ["CameraManager"]), + ], + dependencies: [], + targets: [ + .target( + name: "CameraManager", + dependencies: [], + path: "Sources", + sources: ["CameraManager.swift"] + ) + ], + swiftLanguageVersions: [.v5] ) diff --git a/README.md b/README.md index b081e85..3bea79e 100755 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The easiest way to install the CameraManager is with [CocoaPods](http://cocoapod ```ruby use_frameworks! -pod 'CameraManager', '~> 4.4' +pod 'CameraManager', '~> 5.0' ``` ## Installation with Swift Package Manager @@ -29,7 +29,7 @@ import PackageDescription let package = Package( dependencies: [ - .Package(url: "https://github.com/imaginary-cloud/CameraManager", majorVersion: 4, minor: 3) + .Package(url: "https://github.com/imaginary-cloud/CameraManager", from: "5.0.0") ] ) ``` @@ -41,7 +41,7 @@ let package = Package( Add the following line to your Cartfile: ``` -github "imaginary-cloud/CameraManager" >= 4.4 +github "imaginary-cloud/CameraManager" >= 5.0 ``` And run `carthage update` to build the dynamic framework. @@ -217,13 +217,13 @@ cameraManager.showErrorBlock = { (erTitle: String, erMessage: String) -> Void in ## Support -Supports iOS 9 and above. Xcode 10.0 is required to build the latest code written in Swift 4.2. +Supports iOS 9 and above. Xcode 11.4 is required to build the latest code written in Swift 5.2. Now it's compatible with latest Swift syntax, so if you're using any Swift version prior to 4.2 make sure to use one of the previously tagged releases: -- for Swift 4.0 see: [v4.4.0](https://github.com/imaginary-cloud/CameraManager/tree/4.4.0)) +- for Swift 4.0 see: [v4.4.0](https://github.com/imaginary-cloud/CameraManager/tree/4.4.0) -- for Swift 3.0 see: [v3.2.0](https://github.com/imaginary-cloud/CameraManager/tree/3.2.0)). +- for Swift 3.0 see: [v3.2.0](https://github.com/imaginary-cloud/CameraManager/tree/3.2.0). ## License diff --git a/CameraManager/CameraManager.h b/Sources/CameraManager.h similarity index 100% rename from CameraManager/CameraManager.h rename to Sources/CameraManager.h diff --git a/camera/CameraManager.swift b/Sources/CameraManager.swift similarity index 99% rename from camera/CameraManager.swift rename to Sources/CameraManager.swift index 41022fd..1a25ec2 100644 --- a/camera/CameraManager.swift +++ b/Sources/CameraManager.swift @@ -119,7 +119,7 @@ public enum CaptureError: Error { } /// Class for handling iDevices custom camera usage -open class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGestureRecognizerDelegate { +public class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGestureRecognizerDelegate { // MARK: - Public properties @@ -572,9 +572,9 @@ open class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGest imageCompletion(.failure(error)) return } + } else { + imageCompletion(CaptureResult(image)) } - - imageCompletion(CaptureResult(image)) } fileprivate func _setVideoWithGPS(forLocation location: CLLocation) { @@ -853,7 +853,7 @@ open class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGest } // MARK: - AVCaptureFileOutputRecordingDelegate - public func fileOutput(captureOutput: AVCaptureFileOutput, didStartRecordingTo fileURL: URL, from connections: [AVCaptureConnection]) { + public func fileOutput(_ captureOutput: AVCaptureFileOutput, didStartRecordingTo fileURL: URL, from connections: [AVCaptureConnection]) { captureSession?.beginConfiguration() if flashMode != .off { _updateIlluminationMode(flashMode) @@ -1475,8 +1475,8 @@ open class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGest } } - fileprivate func updateDeviceOrientation(_ orientaion: UIDeviceOrientation) { - self.deviceOrientation = orientaion + fileprivate func updateDeviceOrientation(_ orientation: UIDeviceOrientation) { + self.deviceOrientation = orientation } fileprivate func _stopFollowingDeviceOrientation() { @@ -1648,7 +1648,7 @@ open class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGest // MARK: - CameraLocationManager() - fileprivate class CameraLocationManager: NSObject, CLLocationManagerDelegate { + public class CameraLocationManager: NSObject, CLLocationManagerDelegate { var locationManager = CLLocationManager() var latestLocation: CLLocation? @@ -1670,12 +1670,12 @@ open class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGest } // MARK: - CLLocationManagerDelegate - func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { + public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { // Pick the location with best (= smallest value) horizontal accuracy latestLocation = locations.sorted { $0.horizontalAccuracy < $1.horizontalAccuracy }.first } - func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { + public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { if status == .authorizedAlways || status == .authorizedWhenInUse { locationManager.startUpdatingLocation() } else { @@ -1924,7 +1924,7 @@ open class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate, UIGest } fileprivate extension AVCaptureDevice { - fileprivate static var videoDevices: [AVCaptureDevice] { + static var videoDevices: [AVCaptureDevice] { return AVCaptureDevice.devices(for: AVMediaType.video) } } diff --git a/CameraManager/Info.plist b/Sources/Info.plist similarity index 100% rename from CameraManager/Info.plist rename to Sources/Info.plist diff --git a/camera.xcodeproj/project.xcworkspace/xcshareddata/camera.xccheckout b/camera.xcodeproj/project.xcworkspace/xcshareddata/camera.xccheckout deleted file mode 100644 index 343505e..0000000 --- a/camera.xcodeproj/project.xcworkspace/xcshareddata/camera.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - B6656DA7-2538-41EB-B435-476DC073ECE9 - IDESourceControlProjectName - camera - IDESourceControlProjectOriginsDictionary - - E1D0A3AE6B49B031DF6A25973E5414F28D2A575A - https://github.com/imaginary-cloud/CameraManager.git - - IDESourceControlProjectPath - camera.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - E1D0A3AE6B49B031DF6A25973E5414F28D2A575A - ../.. - - IDESourceControlProjectURL - https://github.com/imaginary-cloud/CameraManager.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - E1D0A3AE6B49B031DF6A25973E5414F28D2A575A - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - E1D0A3AE6B49B031DF6A25973E5414F28D2A575A - IDESourceControlWCCName - CameraManager - - - - diff --git a/camera.xcodeproj/project.xcworkspace/xcuserdata/nataliaterlecka.xcuserdatad/UserInterfaceState.xcuserstate b/camera.xcodeproj/project.xcworkspace/xcuserdata/nataliaterlecka.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index f14ce576f289d12a74c9a7714fbbfd7777e191cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67606 zcmd@72YeGZ_&<)Hq`R|y!**IWEe)F%vNtU)PV9h77I6{?%XJb1DIred1WJMS)V=qf ztU~vmbnm_C-h1!8e~)xN$IgP#em?zwKmYdCCb^T|di3a7dZd#Y+FF{U9hsTi1SDXA z2%;bfa?0kEEpx}M2)9R@Bdv4CMH&taH+Dqp$A#J(mo~%WnsFVGwp|2t^tx+Pq&)?j zU>9~31_^_O3?Wm<60(IHAy>!~@`VDSP$&|n3VRFXLWNK%R0*?%Y9S!h2=jykgpjaA zSSCb-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s z(zemI(G@QURg|9Ok*b6vaMRh P`V(8g`g7^Oiy8k1%+y?7 diff --git a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index fe2b454..0000000 --- a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist b/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 7e9ea9b..0000000 --- a/camera.xcodeproj/xcuserdata/nataliaterlecka.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,37 +0,0 @@ - - - - - SchemeUserState - - camera.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 453228F21AC2AD9A00A7EE76 - - primary - - - 454C1F4019E82E2500C81915 - - primary - - - 454C1F5519E82E2500C81915 - - primary - - - D71DE8801AD677A7001E62F1 - - primary - - - - - diff --git a/camera/CameraManager.swift.qlpreview/Preview.txt b/camera/CameraManager.swift.qlpreview/Preview.txt deleted file mode 100644 index 0d7b37a..0000000 --- a/camera/CameraManager.swift.qlpreview/Preview.txt +++ /dev/null @@ -1,653 +0,0 @@ -// -// CameraManager.swift -// camera -// -// Created by Natalia Terlecka on 10/10/14. -// Copyright (c) 2014 imaginaryCloud. All rights reserved. -// - -import UIKit -import AVFoundation -import AssetsLibrary - -private let _singletonSharedInstance = CameraManager() - -enum CameraDevice { - case Front, Back -} - -enum CameraFlashMode: Int { - case Off, On, Auto -} - -enum CameraOutputMode { - case StillImage, VideoWithMic, VideoOnly -} - -enum CameraOutputQuality { - case Low, Medium, High -} - -/// Class for handling iDevices custom camera usage -class CameraManager: NSObject, AVCaptureFileOutputRecordingDelegate { - - /// Capture session to customize camera settings. - var captureSession: AVCaptureSession? - - /// Property to determine if the manager should show the error for the user. If you want to show the errors yourself set this to false. If you want to add custom error UI set showErrorBlock property. Default value is true. - var showErrorsToUsers = true - - /// A block creating UI to present error message to the user. - var showErrorBlock:(erTitle: String, erMessage: String) -> Void = { (erTitle: String, erMessage: String) -> Void in - UIAlertView(title: erTitle, message: erMessage, delegate: nil, cancelButtonTitle: "OK").show() - } - - /// Property to determine if manager should write the resources to the phone library. Default value is true. - var writeFilesToPhoneLibrary = true - - /// The Bool property to determin if current device has front camera. - var hasFrontCamera: Bool = { - let devices = AVCaptureDevice.devicesWithMediaType(AVMediaTypeVideo) - for device in devices { - let captureDevice = device as AVCaptureDevice - if (captureDevice.position == .Front) { - return true - } - } - return false - }() - - /// Property to change camera device between front and back. - var cameraDevice: CameraDevice { - get { - return _cameraDevice - } - set(newCameraDevice) { - if let validCaptureSession = self.captureSession { - validCaptureSession.beginConfiguration() - let inputs = validCaptureSession.inputs as [AVCaptureInput] - - switch newCameraDevice { - case .Front: - if self.hasFrontCamera { - if let validBackDevice = self.rearCamera? { - if contains(inputs, validBackDevice) { - validCaptureSession.removeInput(validBackDevice) - } - } - if let validFrontDevice = self.frontCamera? { - if !contains(inputs, validFrontDevice) { - validCaptureSession.addInput(validFrontDevice) - } - } - } - case .Back: - if let validFrontDevice = self.frontCamera? { - if contains(inputs, validFrontDevice) { - validCaptureSession.removeInput(validFrontDevice) - } - } - if let validBackDevice = self.rearCamera? { - if !contains(inputs, validBackDevice) { - validCaptureSession.addInput(validBackDevice) - } - } - } - validCaptureSession.commitConfiguration() - } - _cameraDevice = newCameraDevice - } - } - - /// Property to change camera flash mode. - var flashMode: CameraFlashMode { - get { - return _flashMode - } - set(newflashMode) { - if newflashMode != _flashMode { - self.captureSession?.beginConfiguration() - let devices = AVCaptureDevice.devicesWithMediaType(AVMediaTypeVideo) - for device in devices { - let captureDevice = device as AVCaptureDevice - if (captureDevice.position == AVCaptureDevicePosition.Back) { - let avFlashMode = AVCaptureFlashMode(rawValue: newflashMode.rawValue) - if (captureDevice.isFlashModeSupported(avFlashMode!)) { - captureDevice.lockForConfiguration(nil) - captureDevice.flashMode = avFlashMode! - captureDevice.unlockForConfiguration() - } - } - } - self.captureSession?.commitConfiguration() - - _flashMode = newflashMode - } - } - } - - /// Property to change camera output quality. - var cameraOutputQuality: CameraOutputQuality { - get { - return _cameraOutputQuality - } - set(newCameraOutputQuality) { - if newCameraOutputQuality != _cameraOutputQuality { - if let validCaptureSession = self.captureSession? { - validCaptureSession.beginConfiguration() - switch (newCameraOutputQuality) { - case CameraOutputQuality.Low: - validCaptureSession.sessionPreset = AVCaptureSessionPresetLow - case CameraOutputQuality.Medium: - validCaptureSession.sessionPreset = AVCaptureSessionPresetMedium - case CameraOutputQuality.High: - validCaptureSession.sessionPreset = AVCaptureSessionPresetHigh - } - validCaptureSession.commitConfiguration() - - _cameraOutputQuality = newCameraOutputQuality - } else { - self._show("Camera error", message: "No valid capture session found, I can't take any pictures or videos.") - } - } - } - } - - /// Property to change camera output. - var cameraOutputMode: CameraOutputMode { - get { - return _cameraOutputMode - } - set(newCameraOutputMode) { - if newCameraOutputMode != _cameraOutputMode { - self._setupOutputMode(newCameraOutputMode) - } - } - } - - private weak var embedingView: UIView? - private var videoCompletition: ((videoURL: NSURL) -> Void)? - - private var sessionQueue: dispatch_queue_t = dispatch_queue_create("CameraSessionQueue", DISPATCH_QUEUE_SERIAL) - - private var frontCamera: AVCaptureInput? - private var rearCamera: AVCaptureInput? - private var mic: AVCaptureDeviceInput? - private var stillImageOutput: AVCaptureStillImageOutput? - private var movieOutput: AVCaptureMovieFileOutput? - private var previewLayer: AVCaptureVideoPreviewLayer? - private var library: ALAssetsLibrary? - - private var cameraIsSetup = false - private var cameraIsObservingDeviceOrientation = false - - private var _cameraDevice = CameraDevice.Back - private var _flashMode = CameraFlashMode.Off - private var _cameraOutputMode = CameraOutputMode.StillImage - private var _cameraOutputQuality = CameraOutputQuality.High - - private var tempFilePath: NSURL = { - let tempPath = NSTemporaryDirectory().stringByAppendingPathComponent("tempMovie").stringByAppendingPathExtension("mp4") - if NSFileManager.defaultManager().fileExistsAtPath(tempPath!) { - NSFileManager.defaultManager().removeItemAtPath(tempPath!, error: nil) - } - return NSURL(fileURLWithPath: tempPath!)! - }() - - /// CameraManager singleton instance to use the camera. - class var sharedInstance: CameraManager { - return _singletonSharedInstance - } - - deinit { - self.stopAndRemoveCaptureSession() - self._stopFollowingDeviceOrientation() - } - - /** - Inits a capture session and adds a preview layer to the given view. Preview layer bounds will automaticaly be set to match given view. Default session is initialized with still image output. - - :param: view The view you want to add the preview layer to - :param: cameraOutputMode The mode you want capturesession to run image / video / video and microphone - */ - func addPreviewLayerToView(view: UIView) - { - self.addPreviewLayerToView(view, newCameraOutputMode: _cameraOutputMode) - } - func addPreviewLayerToView(view: UIView, newCameraOutputMode: CameraOutputMode) - { - if let validEmbedingView = self.embedingView? { - if let validPreviewLayer = self.previewLayer? { - validPreviewLayer.removeFromSuperlayer() - } - } - if self.cameraIsSetup { - self._addPreeviewLayerToView(view) - self.cameraOutputMode = newCameraOutputMode - } else { - self._setupCamera({ Void -> Void in - self._addPreeviewLayerToView(view) - self.cameraOutputMode = newCameraOutputMode - }) - } - } - - /** - Stops running capture session but all setup devices, inputs and outputs stay for further reuse. - */ - func stopCaptureSession() - { - self.captureSession?.stopRunning() - self._stopFollowingDeviceOrientation() - } - - /** - Resumes capture session. - */ - func resumeCaptureSession() - { - if let validCaptureSession = self.captureSession? { - if !validCaptureSession.running && self.cameraIsSetup { - validCaptureSession.startRunning() - self._startFollowingDeviceOrientation() - } - } else { - if self.cameraIsSetup { - self.stopAndRemoveCaptureSession() - } - self._setupCamera({Void -> Void in - if let validEmbedingView = self.embedingView? { - self._addPreeviewLayerToView(validEmbedingView) - } - self._startFollowingDeviceOrientation() - }) - } - } - - /** - Stops running capture session and removes all setup devices, inputs and outputs. - */ - func stopAndRemoveCaptureSession() - { - self.stopCaptureSession() - self.cameraDevice = .Back - self.cameraIsSetup = false - self.previewLayer = nil - self.captureSession = nil - self.frontCamera = nil - self.rearCamera = nil - self.mic = nil - self.stillImageOutput = nil - self.movieOutput = nil - } - - /** - Captures still image from currently running capture session. - - :param: imageCompletition Completition block containing the captured UIImage - */ - func capturePictureWithCompletition(imageCompletition: UIImage -> Void) - { - if self.cameraIsSetup { - if self.cameraOutputMode == .StillImage { - dispatch_async(self.sessionQueue, { - self._getStillImageOutput().captureStillImageAsynchronouslyFromConnection(self._getStillImageOutput().connectionWithMediaType(AVMediaTypeVideo), completionHandler: { [weak self] (sample: CMSampleBuffer!, error: NSError!) -> Void in - if (error? != nil) { - dispatch_async(dispatch_get_main_queue(), { - if let weakSelf = self { - weakSelf._show("error", message: error.localizedDescription) - } - }) - } else { - let imageData = AVCaptureStillImageOutput.jpegStillImageNSDataRepresentation(sample) - if let weakSelf = self { - if weakSelf.writeFilesToPhoneLibrary { - if let validLibrary = weakSelf.library? { - validLibrary.writeImageDataToSavedPhotosAlbum(imageData, metadata:nil, completionBlock: { - (picUrl, error) -> Void in - if (error? != nil) { - dispatch_async(dispatch_get_main_queue(), { - weakSelf._show("error", message: error.localizedDescription) - }) - } - }) - } - } - } - imageCompletition(UIImage(data: imageData)!) - } - }) - }) - } else { - self._show("Capture session output mode video", message: "I can't take any picture") - } - } else { - self._show("No capture session setup", message: "I can't take any picture") - } - } - - /** - Starts recording a video with or without voice as in the session preset. - */ - func startRecordingVideo() - { - if self.cameraOutputMode != .StillImage { - self._getMovieOutput().startRecordingToOutputFileURL(self.tempFilePath, recordingDelegate: self) - } else { - self._show("Capture session output still image", message: "I can only take pictures") - } - } - - /** - Stop recording a video. Save it to the cameraRoll and give back the url. - */ - func stopRecordingVideo(completition:(videoURL: NSURL) -> Void) - { - if let runningMovieOutput = self.movieOutput { - if runningMovieOutput.recording { - self.videoCompletition = completition - runningMovieOutput.stopRecording() - } - } - } - - - // PRAGMA MARK - AVCaptureFileOutputRecordingDelegate - - func captureOutput(captureOutput: AVCaptureFileOutput!, didStartRecordingToOutputFileAtURL fileURL: NSURL!, fromConnections connections: [AnyObject]!) - { - - } - - func captureOutput(captureOutput: AVCaptureFileOutput!, didFinishRecordingToOutputFileAtURL outputFileURL: NSURL!, fromConnections connections: [AnyObject]!, error: NSError!) - { - if (error != nil) { - self._show("Unable to save video to the iPhone", message: error.localizedDescription) - } else { - if let validLibrary = self.library? { - if self.writeFilesToPhoneLibrary { - validLibrary.writeVideoAtPathToSavedPhotosAlbum(outputFileURL, completionBlock: { (assetURL: NSURL?, error: NSError?) -> Void in - if (error != nil) { - self._show("Unable to save video to the iPhone.", message: error!.localizedDescription) - } else { - if let validAssetURL = assetURL { - self._executeVideoCompletitionWithURL(validAssetURL) - } - } - }) - } else { - self._executeVideoCompletitionWithURL(outputFileURL) - } - } - } - } - - // PRAGMA MARK - CameraManager() - - private func _executeVideoCompletitionWithURL(url: NSURL) - { - if let validCompletition = self.videoCompletition { - validCompletition(videoURL: url) - self.videoCompletition = nil - } - } - - private func _getMovieOutput() -> AVCaptureMovieFileOutput - { - var shouldReinitializeMovieOutput = self.movieOutput == nil - if !shouldReinitializeMovieOutput { - if let connection = self.movieOutput!.connectionWithMediaType(AVMediaTypeVideo) { - shouldReinitializeMovieOutput = shouldReinitializeMovieOutput || !connection.active - } - } - - if shouldReinitializeMovieOutput { - self.movieOutput = AVCaptureMovieFileOutput() - - self.captureSession?.beginConfiguration() - self.captureSession?.addOutput(self.movieOutput) - self.captureSession?.commitConfiguration() - } - return self.movieOutput! - } - - private func _getStillImageOutput() -> AVCaptureStillImageOutput - { - var shouldReinitializeStillImageOutput = self.stillImageOutput == nil - if !shouldReinitializeStillImageOutput { - if let connection = self.stillImageOutput!.connectionWithMediaType(AVMediaTypeVideo) { - shouldReinitializeStillImageOutput = shouldReinitializeStillImageOutput || !connection.active - } - } - if shouldReinitializeStillImageOutput { - self.stillImageOutput = AVCaptureStillImageOutput() - - self.captureSession?.beginConfiguration() - self.captureSession?.addOutput(self.stillImageOutput) - self.captureSession?.commitConfiguration() - } - return self.stillImageOutput! - } - - @objc private func _orientationChanged() - { - var currentConnection: AVCaptureConnection?; - switch self.cameraOutputMode { - case .StillImage: - currentConnection = self.stillImageOutput?.connectionWithMediaType(AVMediaTypeVideo) - case .VideoOnly, .VideoWithMic: - currentConnection = self._getMovieOutput().connectionWithMediaType(AVMediaTypeVideo) - } - if let validPreviewLayer = self.previewLayer? { - if let validPreviewLayerConnection = validPreviewLayer.connection? { - if validPreviewLayerConnection.supportsVideoOrientation { - validPreviewLayerConnection.videoOrientation = self._currentVideoOrientation() - } - } - if let validOutputLayerConnection = currentConnection? { - if validOutputLayerConnection.supportsVideoOrientation { - validOutputLayerConnection.videoOrientation = self._currentVideoOrientation() - } - } - dispatch_async(dispatch_get_main_queue(), { () -> Void in - if let validEmbedingView = self.embedingView? { - validPreviewLayer.frame = validEmbedingView.bounds - } - }) - } - } - - private func _currentVideoOrientation() -> AVCaptureVideoOrientation - { - switch UIDevice.currentDevice().orientation { - case .LandscapeLeft: - return .LandscapeRight - case .LandscapeRight: - return .LandscapeLeft - default: - return .Portrait - } - } - - private func _setupCamera(completition: Void -> Void) - { - if self._checkIfCameraIsAvailable() { - self.captureSession = AVCaptureSession() - - dispatch_async(sessionQueue, { - if let validCaptureSession = self.captureSession? { - validCaptureSession.beginConfiguration() - validCaptureSession.sessionPreset = AVCaptureSessionPresetHigh - self._addVideoInput() - self._setupOutputs() - self._setupOutputMode(self._cameraOutputMode) - self.cameraOutputQuality = self._cameraOutputQuality - self._setupPreviewLayer() - validCaptureSession.commitConfiguration() - validCaptureSession.startRunning() - self._startFollowingDeviceOrientation() - self.cameraIsSetup = true - - completition() - } - }) - } else { - self._show("Camera unavailable", message: "The device does not have a camera") - } - } - - private func _startFollowingDeviceOrientation() - { - if !self.cameraIsObservingDeviceOrientation { - NSNotificationCenter.defaultCenter().addObserver(self, selector: "_orientationChanged", name: UIDeviceOrientationDidChangeNotification, object: nil) - self.cameraIsObservingDeviceOrientation = true - } - } - - private func _stopFollowingDeviceOrientation() - { - if self.cameraIsObservingDeviceOrientation { - NSNotificationCenter.defaultCenter().removeObserver(self, name: UIDeviceOrientationDidChangeNotification, object: nil) - self.cameraIsObservingDeviceOrientation = false - } - } - - private func _addPreeviewLayerToView(view: UIView) - { - self.embedingView = view - dispatch_async(dispatch_get_main_queue(), { () -> Void in - self.previewLayer?.frame = view.layer.bounds - view.clipsToBounds = true - view.layer.addSublayer(self.previewLayer) - }) - } - - private func _checkIfCameraIsAvailable() -> Bool - { - let deviceHasCamera = UIImagePickerController.isCameraDeviceAvailable(UIImagePickerControllerCameraDevice.Rear) || UIImagePickerController.isCameraDeviceAvailable(UIImagePickerControllerCameraDevice.Front) - return deviceHasCamera - } - - private func _addVideoInput() - { - var error: NSError? - - if (self.frontCamera? == nil) || (self.rearCamera? == nil) { - var videoFrontDevice: AVCaptureDevice? - var videoBackDevice: AVCaptureDevice? - for device: AnyObject in AVCaptureDevice.devicesWithMediaType(AVMediaTypeVideo) { - if device.position == AVCaptureDevicePosition.Back { - videoBackDevice = device as? AVCaptureDevice - } else if device.position == AVCaptureDevicePosition.Front { - videoFrontDevice = device as? AVCaptureDevice - } - } - if (self.frontCamera? == nil) { - if let validVideoFrontDevice = videoFrontDevice? { - self.frontCamera = AVCaptureDeviceInput.deviceInputWithDevice(validVideoFrontDevice, error: &error) as AVCaptureDeviceInput - } - } - if (self.rearCamera? == nil) { - if let validVideoBackDevice = videoBackDevice? { - self.rearCamera = AVCaptureDeviceInput.deviceInputWithDevice(validVideoBackDevice, error: &error) as AVCaptureDeviceInput - } - } - if let validError = error? { - self._show("Device setup error occured", message: validError.localizedDescription) - } - } - self.cameraDevice = _cameraDevice - } - - private func _setupMic() - { - if (self.mic == nil) { - var error: NSError? - let micDevice:AVCaptureDevice = AVCaptureDevice.defaultDeviceWithMediaType(AVMediaTypeAudio); - self.mic = AVCaptureDeviceInput.deviceInputWithDevice(micDevice, error: &error) as? AVCaptureDeviceInput; - if let errorHappened = error? { - self.mic = nil - self._show("Mic error", message: errorHappened.description) - } - } - } - - private func _setupOutputMode(newCameraOutputMode: CameraOutputMode) - { - self.captureSession?.beginConfiguration() - - if (_cameraOutputMode != newCameraOutputMode) { - // remove current setting - switch _cameraOutputMode { - case .StillImage: - if let validStillImageOutput = self.stillImageOutput? { - self.captureSession?.removeOutput(validStillImageOutput) - } - case .VideoOnly, .VideoWithMic: - if let validMovieOutput = self.movieOutput? { - self.captureSession?.removeOutput(validMovieOutput) - } - if _cameraOutputMode == .VideoWithMic { - if let validMic = self.mic? { - self.captureSession?.removeInput(validMic) - } - } - } - } - - // configure new devices - switch newCameraOutputMode { - case .StillImage: - if (self.stillImageOutput == nil) { - self._setupOutputs() - } - if let validStillImageOutput = self.stillImageOutput? { - self.captureSession?.addOutput(validStillImageOutput) - } - case .VideoOnly, .VideoWithMic: - self.captureSession?.addOutput(self._getMovieOutput()) - - if newCameraOutputMode == .VideoWithMic { - if (self.mic == nil) { - self._setupMic() - } - if let validMic = self.mic? { - self.captureSession?.addInput(validMic) - } - } - } - self.captureSession?.commitConfiguration() - _cameraOutputMode = newCameraOutputMode; - self._orientationChanged() - } - - private func _setupOutputs() - { - if (self.stillImageOutput == nil) { - self.stillImageOutput = AVCaptureStillImageOutput() - } - if (self.movieOutput == nil) { - self.movieOutput = AVCaptureMovieFileOutput() - } - if self.library == nil { - self.library = ALAssetsLibrary() - } - } - - private func _setupPreviewLayer() - { - if let validCaptureSession = self.captureSession? { - self.previewLayer = AVCaptureVideoPreviewLayer(session: validCaptureSession) - self.previewLayer?.videoGravity = AVLayerVideoGravityResizeAspectFill - } - } - - private func _show(title: String, message: String) - { - if self.showErrorsToUsers { - dispatch_async(dispatch_get_main_queue(), { () -> Void in - self.showErrorBlock(erTitle: title, erMessage: message) - }) - } - } -} diff --git a/camera/CameraManager.swift.qlpreview/PreviewProperties.plist b/camera/CameraManager.swift.qlpreview/PreviewProperties.plist deleted file mode 100644 index 3d5d57c..0000000 --- a/camera/CameraManager.swift.qlpreview/PreviewProperties.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - BaseBundlePath - /Applications/TextMate.app/Contents/Library/QuickLook/TextMateQL.qlgenerator - -