mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-04-27 15:07:43 +00:00
Change min deployment target to iOS 16
This commit is contained in:
parent
54a288b661
commit
f87433aaf8
3 changed files with 16 additions and 20 deletions
|
|
@ -294,7 +294,6 @@
|
||||||
ENABLE_MODULE_VERIFIER = YES;
|
ENABLE_MODULE_VERIFIER = YES;
|
||||||
INFOPLIST_FILE = "SwiftyCam-iOS/Info.plist";
|
INFOPLIST_FILE = "SwiftyCam-iOS/Info.plist";
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|
@ -325,7 +324,6 @@
|
||||||
ENABLE_MODULE_VERIFIER = YES;
|
ENABLE_MODULE_VERIFIER = YES;
|
||||||
INFOPLIST_FILE = "SwiftyCam-iOS/Info.plist";
|
INFOPLIST_FILE = "SwiftyCam-iOS/Info.plist";
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|
@ -394,7 +392,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
|
|
@ -450,7 +448,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
|
@ -467,7 +465,6 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
DEVELOPMENT_TEAM = QE4PFXDL4H;
|
DEVELOPMENT_TEAM = QE4PFXDL4H;
|
||||||
INFOPLIST_FILE = DemoSwiftyCam/Info.plist;
|
INFOPLIST_FILE = DemoSwiftyCam/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|
@ -485,7 +482,6 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
DEVELOPMENT_TEAM = QE4PFXDL4H;
|
DEVELOPMENT_TEAM = QE4PFXDL4H;
|
||||||
INFOPLIST_FILE = DemoSwiftyCam/Info.plist;
|
INFOPLIST_FILE = DemoSwiftyCam/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|
|
||||||
|
|
@ -60,19 +60,14 @@ class Orientation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPreviewLayerOrientation() -> AVCaptureVideoOrientation {
|
func getPreviewLayerOrientation(interfaceOrientation: UIInterfaceOrientation) -> AVCaptureVideoOrientation {
|
||||||
// Depends on layout orientation, not device orientation
|
// Depends on layout orientation, not device orientation
|
||||||
switch UIApplication.shared.statusBarOrientation {
|
switch interfaceOrientation {
|
||||||
case .portrait, .unknown:
|
case .portrait, .unknown: return .portrait
|
||||||
return AVCaptureVideoOrientation.portrait
|
case .landscapeLeft: return .landscapeLeft
|
||||||
case .landscapeLeft:
|
case .landscapeRight: return .landscapeRight
|
||||||
return AVCaptureVideoOrientation.landscapeLeft
|
case .portraitUpsideDown: return .portraitUpsideDown
|
||||||
case .landscapeRight:
|
@unknown default: return .portrait
|
||||||
return AVCaptureVideoOrientation.landscapeRight
|
|
||||||
case .portraitUpsideDown:
|
|
||||||
return AVCaptureVideoOrientation.portraitUpsideDown
|
|
||||||
@unknown default:
|
|
||||||
return .portrait
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -394,6 +394,10 @@ open class SwiftyCamViewController: UIViewController {
|
||||||
override open func viewDidAppear(_ animated: Bool) {
|
override open func viewDidAppear(_ animated: Bool) {
|
||||||
super.viewDidAppear(animated)
|
super.viewDidAppear(animated)
|
||||||
|
|
||||||
|
guard let interfaceOrientation = view.window?.windowScene?.interfaceOrientation else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Subscribe to device rotation notifications
|
// Subscribe to device rotation notifications
|
||||||
|
|
||||||
if shouldUseDeviceOrientation {
|
if shouldUseDeviceOrientation {
|
||||||
|
|
@ -413,7 +417,8 @@ open class SwiftyCamViewController: UIViewController {
|
||||||
|
|
||||||
// Preview layer video orientation can be set only after the connection is created
|
// Preview layer video orientation can be set only after the connection is created
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.previewLayer.videoPreviewLayer.connection?.videoOrientation = self.orientation.getPreviewLayerOrientation()
|
let layerOrientation = self.orientation.getPreviewLayerOrientation(interfaceOrientation: interfaceOrientation)
|
||||||
|
self.previewLayer.videoPreviewLayer.connection?.videoOrientation = layerOrientation
|
||||||
}
|
}
|
||||||
|
|
||||||
case .notAuthorized:
|
case .notAuthorized:
|
||||||
|
|
@ -945,7 +950,7 @@ extension SwiftyCamViewController {
|
||||||
|
|
||||||
private var firstCaptureDevice: AVCaptureDevice? {
|
private var firstCaptureDevice: AVCaptureDevice? {
|
||||||
AVCaptureDevice.DiscoverySession(
|
AVCaptureDevice.DiscoverySession(
|
||||||
deviceTypes: [.builtInDualCamera, .builtInWideAngleCamera],
|
deviceTypes: [.builtInTripleCamera, .builtInDualCamera, .builtInWideAngleCamera],
|
||||||
mediaType: .video,
|
mediaType: .video,
|
||||||
position: .unspecified
|
position: .unspecified
|
||||||
).devices.first
|
).devices.first
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue