Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Cleanup For Cocoapods #57

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup for cocoapods release
twof committed Jan 7, 2019
commit 9bf399e5d223113b04a3c326a0ba687546a74efc
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
@@ -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" => "info@inloopx.com" }
s.source = { :git => 'ssh://git@github.com/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
@@ -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";
@@ -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";
@@ -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;
@@ -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)";
Binary file not shown.
8 changes: 4 additions & 4 deletions ImagePicker/CaptureSession.swift
Original file line number Diff line number Diff line change
@@ -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()

@@ -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) {
@@ -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
3 changes: 2 additions & 1 deletion ImagePicker/ImagePickerController.swift
Original file line number Diff line number Diff line change
@@ -233,7 +233,8 @@ open class ImagePickerController : UIViewController {
fileprivate var collectionViewCoordinator: CollectionViewUpdatesCoordinator!

fileprivate var imagePickerView: ImagePickerView! {
return view as! ImagePickerView
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't affects functionality. if kept as fatal please specify error message if possible

guard let imagePickerView = view as? ImagePickerView else { fatalError() }
return imagePickerView
}

fileprivate var collectionViewDataSource = ImagePickerDataSource(assetsModel: ImagePickerAssetModel())
2 changes: 1 addition & 1 deletion ImagePicker/UIImageEffects.swift
Original file line number Diff line number Diff line change
@@ -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 {
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.