Skip to content

Commit

Permalink
Merge pull request #5 from redbooth/prepForRelease
Browse files Browse the repository at this point in the history
cleanup for cocoapods release
  • Loading branch information
twof authored Jan 7, 2019
2 parents 7bb5c31 + 9bf399e commit df9aaee
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
Binary file modified .DS_Store
Binary file not shown.
10 changes: 7 additions & 3 deletions image-picker.podspec → ImagePicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ Pod::Spec.new do |s|
s.summary = 'An easy to use, highly configurable image picker for your chat application.'
s.homepage = 'https://github.com/redbooth/image-picker'
s.author = { "INLOOPX" => "[email protected]" }
s.source = { :git => 'ssh://[email protected]/redbooth/image-picker.git' }
s.ios.deployment_target = '10.0'
s.tvos.deployment_target = '9.0'
s.source = { :git => 'https://github.com/redbooth/image-picker.git' }

s.swift_version = '4.2'

s.ios.deployment_target = '10.3'

s.requires_arc = true

s.source_files = 'ImagePicker/**/*.{swift,h,m}'
s.resources = 'ImagePicker/Resources/**/*'
s.frameworks = 'UIKit', 'Photos'

s.license = { :type => 'MIT' }
end
8 changes: 4 additions & 4 deletions ImagePicker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = P2PP2EM79F;
INFOPLIST_FILE = ExampleApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.twof.ExampleApp;
PRODUCT_NAME = "Image Picker";
Expand All @@ -646,7 +646,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = P2PP2EM79F;
INFOPLIST_FILE = ExampleApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.twof.ExampleApp;
PRODUCT_NAME = "Image Picker";
Expand All @@ -668,7 +668,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ImagePicker/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_SWIFT_FLAGS = "-DDEBUG";
PRODUCT_BUNDLE_IDENTIFIER = eu.inloop.ImagePicker;
Expand Down Expand Up @@ -696,7 +696,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ImagePicker/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = eu.inloop.ImagePicker;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Binary file not shown.
8 changes: 4 additions & 4 deletions ImagePicker/CaptureSession.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ final class CaptureSession : NSObject {
fileprivate let sessionQueue = DispatchQueue(label: "session queue", attributes: [], target: nil)
fileprivate var setupResult: SessionSetupResult = .success
fileprivate var videoDeviceInput: AVCaptureDeviceInput!
fileprivate lazy var videoDeviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [AVCaptureDevice.DeviceType.builtInWideAngleCamera, AVCaptureDevice.DeviceType.builtInDuoCamera], mediaType: AVMediaType.video, position: .unspecified)
fileprivate lazy var videoDeviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [AVCaptureDevice.DeviceType.builtInWideAngleCamera, AVCaptureDevice.DeviceType.builtInDualCamera], mediaType: AVMediaType.video, position: .unspecified)
fileprivate var videoDataOutput: AVCaptureVideoDataOutput?
fileprivate let videoOutpuSampleBufferDelegate = VideoOutputSampleBufferDelegate()

Expand Down Expand Up @@ -319,7 +319,7 @@ final class CaptureSession : NSObject {
var defaultVideoDevice: AVCaptureDevice?

// Choose the back dual camera if available, otherwise default to a wide angle camera.
if let dualCameraDevice = AVCaptureDevice.default(AVCaptureDevice.DeviceType.builtInDuoCamera, for: AVMediaType.video, position: .back) {
if let dualCameraDevice = AVCaptureDevice.default(AVCaptureDevice.DeviceType.builtInDualCamera, for: AVMediaType.video, position: .back) {
defaultVideoDevice = dualCameraDevice
}
else if let backCameraDevice = AVCaptureDevice.default(AVCaptureDevice.DeviceType.builtInWideAngleCamera, for: AVMediaType.video, position: .back) {
Expand Down Expand Up @@ -612,14 +612,14 @@ extension CaptureSession {
switch currentPosition {
case .unspecified, .front:
preferredPosition = .back
preferredDeviceType = AVCaptureDevice.DeviceType.builtInDuoCamera
preferredDeviceType = AVCaptureDevice.DeviceType.builtInDualCamera

case .back:
preferredPosition = .front
preferredDeviceType = AVCaptureDevice.DeviceType.builtInWideAngleCamera
default:
preferredPosition = .back
preferredDeviceType = AVCaptureDevice.DeviceType.builtInDuoCamera
preferredDeviceType = AVCaptureDevice.DeviceType.builtInDualCamera
}

let devices = self.videoDeviceDiscoverySession.devices
Expand Down
3 changes: 2 additions & 1 deletion ImagePicker/ImagePickerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ open class ImagePickerController : UIViewController {
fileprivate var collectionViewCoordinator: CollectionViewUpdatesCoordinator!

fileprivate var imagePickerView: ImagePickerView! {
return view as! ImagePickerView
guard let imagePickerView = view as? ImagePickerView else { fatalError() }
return imagePickerView
}

fileprivate var collectionViewDataSource = ImagePickerDataSource(assetsModel: ImagePickerAssetModel())
Expand Down
2 changes: 1 addition & 1 deletion ImagePicker/UIImageEffects.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public extension UIImage {
var effectImage = self

let hasBlur = blurRadius > __FLT_EPSILON__
let hasSaturationChange = fabs(saturationDeltaFactor - 1.0) > __FLT_EPSILON__
let hasSaturationChange = abs(saturationDeltaFactor - 1.0) > __FLT_EPSILON__

if hasBlur || hasSaturationChange {
func createEffectBuffer(_ context: CGContext) -> vImage_Buffer {
Expand Down
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2019 INLOOPX

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit df9aaee

Please sign in to comment.