Build Information
Failed to build WWCameraPickerController, reference main (548b34), with Swift 6.4 for tvOS using Xcode 27.0 on 21 Sep 2026 02:45:34 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-27.0.0-Release.Candidate.app xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$PWD/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $PWD/.derivedData build -scheme WWCameraPickerController -destination generic/platform=tvOSBuild Log
| | `- error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
251 |
252 | if let error = error { self.takeMovieClosure?(.failure(error)) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:250:118: error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
248 | /// - connections: [AVCaptureConnection]
249 | /// - error: Error?
250 | func fileOutputAction(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
251 |
252 | if let error = error { self.takeMovieClosure?(.failure(error)) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:121:66: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
119 | /// 取得鏡頭的縮放範圍
120 | /// - Returns: Constant.CameraZoomRange?
121 | func cameraZoomRange() -> Constant.CameraZoomRange? { return AVCaptureDevice._default(for: .video)?._zoomRange() }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
122 |
123 | /// 鏡頭縮放 (沒有動態)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:128:95: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
126 | /// - factor: 比率因子
127 | /// - Returns: Result<CGFloat?, Error>?
128 | func cameraZoom(with rate: CGFloat, factor: CGFloat) -> Result<CGFloat?, Error>? { return AVCaptureDevice._default(for: .video)?._zoom(with: rate, factor: factor) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
129 |
130 | /// 鏡頭放大 (有動態)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:133:80: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
131 | /// - Parameter rate: 比率
132 | /// - Returns: Result<CGFloat?, Error>?
133 | func cameraZoomIn(with rate: CGFloat) -> Result<CGFloat?, Error>? { return AVCaptureDevice._default(for: .video)?._zoomIn(with: rate) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
134 |
135 | /// 鏡頭縮小 (有動態)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:138:81: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
136 | /// - Parameter rate: 比率
137 | /// - Returns: Result<CGFloat?, Error>?
138 | func cameraZoomOut(with rate: CGFloat) -> Result<CGFloat?, Error>? { return AVCaptureDevice._default(for: .video)?._zoomOut(with: rate) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
139 |
140 | /// [啟動HDR - High Dynamic Range Imaging](https://zh.wikipedia.org/zh-tw/高动态范围成像)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:143:69: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
141 | /// - Parameter isEnable: Bool
142 | /// - Returns: Result<Bool, Error>
143 | func cameraHDR(isEnable: Bool) -> Result<Bool, Error>? { return AVCaptureDevice._default(for: .video)?._HDR(isEnable: isEnable) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
144 |
145 | /// 產生相簿ViewController
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:150:37: error: 'UIImagePickerController' is unavailable in tvOS
148 | /// - completion: (() -> Void)?
149 | func album(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, animated: Bool = true, completion: (() -> Void)? = nil) {
150 | let imagePickerController = UIImagePickerController._photoLibrary(delegate: delegate)
| `- error: 'UIImagePickerController' is unavailable in tvOS
151 | self.present(imagePickerController, animated: animated) { completion?() }
152 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:211:29: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
212 | let wideAngleDevices = AVCaptureDevice._wideAngleCamera()
213 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:212:32: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
212 | let wideAngleDevices = AVCaptureDevice._wideAngleCamera()
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
213 |
214 | switch position {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:214:9: warning: switch covers known cases, but 'AVCaptureDevice.Position' may have additional unknown values, possibly added in future versions; this is an error in the Swift 6 language mode
212 | let wideAngleDevices = AVCaptureDevice._wideAngleCamera()
213 |
214 | switch position {
| |- warning: switch covers known cases, but 'AVCaptureDevice.Position' may have additional unknown values, possibly added in future versions; this is an error in the Swift 6 language mode
| `- note: handle unknown values using "@unknown default"
215 | case .front: return wideAngleDevices.front
216 | case .back: return wideAngleDevices.back
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile WWCameraPickerController.swift
SwiftCompile normal arm64 Compiling\ resource_bundle_accessor.swift /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources/resource_bundle_accessor.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources/resource_bundle_accessor.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile resource_bundle_accessor.swift
SwiftCompile normal arm64 Compiling\ Extension+.swift /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:17:52: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
17 | static func _default(for type: AVMediaType) -> AVCaptureDevice? { return AVCaptureDevice.default(for: type) }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing static method
18 |
19 | /// 取得前後相機 => AVCaptureDevice
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:14:11: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:44:30: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
44 | func _videoPosition() -> AVCaptureDevice.Position { return self.position }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:47:36: error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
47 | func _captureInput() -> Result<AVCaptureDeviceInput, Error> {
| | `- error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
48 |
49 | do {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:41:11: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:166:102: error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
164 | /// - videoGravity: AVLayerVideoGravity => .resizeAspectFill
165 | /// - Returns: AVCaptureVideoPreviewLayer
166 | func _previewLayer(with frame: CGRect, videoGravity: AVLayerVideoGravity = .resizeAspectFill) -> AVCaptureVideoPreviewLayer {
| | `- error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
167 |
168 | let previewLayer = AVCaptureVideoPreviewLayer(session: self)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:179:32: error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
177 | /// - Parameter input: AVCaptureInput
178 | /// - Returns: Bool
179 | func _canAddInput(_ input: AVCaptureInput) -> Bool {
| | `- error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
180 | guard self.canAddInput(input) else { return false }
181 | self.addInput(input); return true
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:187:40: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
185 | /// - Parameter types: Set<AVMediaType> => [.audio, .video]
186 | /// - Returns: Result<Bool, Error>
187 | func _canAddDevices(with devices: [AVCaptureDevice]) -> Result<Bool, Error> {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
188 |
189 | var isSuccess = false
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:209:34: error: 'AVCaptureOutput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
207 | /// - Parameter input: AVCaptureOutput
208 | /// - Returns: Bool
209 | func _canAddOutput(_ output: AVCaptureOutput) -> Bool {
| | `- error: 'AVCaptureOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
210 | guard self.canAddOutput(output) else { return false }
211 | self.addOutput(output); return true
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:215:35: error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
213 |
214 | /// 清除[AVCaptureInput]
215 | func _removeInputs(_ inputs: [AVCaptureInput]) {
| | `- error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
216 | for input in inputs { self.removeInput(input) }
217 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:159:11: error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| | `- error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:263:78: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
261 | /// - delegate: AVCapturePhotoCaptureDelegate
262 | /// - completion: (() -> Void)?
263 | func _capturePhoto(isHighResolutionPhotoEnabled: Bool = true, flashMode: AVCaptureDevice.FlashMode = .auto, delegate: AVCapturePhotoCaptureDelegate, completion: (() -> Void)? = nil) {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
264 |
265 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:263:123: error: 'AVCapturePhotoCaptureDelegate' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
261 | /// - delegate: AVCapturePhotoCaptureDelegate
262 | /// - completion: (() -> Void)?
263 | func _capturePhoto(isHighResolutionPhotoEnabled: Bool = true, flashMode: AVCaptureDevice.FlashMode = .auto, delegate: AVCapturePhotoCaptureDelegate, completion: (() -> Void)? = nil) {
| | `- error: 'AVCapturePhotoCaptureDelegate' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
264 |
265 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:280:71: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
278 | /// - isHighResolutionPhotoEnabled: 高解析度
279 | /// - quality: 拍照品質
280 | func _setting(isHighResolutionPhotoEnabled: Bool = true, quality: AVCapturePhotoOutput.QualityPrioritization) -> Self {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
281 |
282 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:255:11: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:35: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:115: error: 'UIImagePickerController' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:308: error: 'UIImagePickerController' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:327:42: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
325 | /// - tintColor: NavigationBar的TintColor
326 | /// - Returns: UIImagePickerController
327 | static func _photoLibrary(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
328 | return Self._build(delegate: delegate, sourceType: .photoLibrary, mediaTypes: [.image], modalTransitionStyle: modalTransitionStyle, allowsEditing: allowsEditing, tintColor: tintColor)
329 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:327:245: error: 'UIImagePickerController' is unavailable in tvOS
325 | /// - tintColor: NavigationBar的TintColor
326 | /// - Returns: UIImagePickerController
327 | static func _photoLibrary(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
328 | return Self._build(delegate: delegate, sourceType: .photoLibrary, mediaTypes: [.image], modalTransitionStyle: modalTransitionStyle, allowsEditing: allowsEditing, tintColor: tintColor)
329 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:295:11: error: 'UIImagePickerController' is unavailable in tvOS
293 |
294 | // MARK: - UIImagePickerController (static function)
295 | extension UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
296 |
297 | /// 產生UIImagePickerController基本型
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:17:78: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
17 | static func _default(for type: AVMediaType) -> AVCaptureDevice? { return AVCaptureDevice.default(for: type) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing static method
18 |
19 | /// 取得前後相機 => AVCaptureDevice
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:23:23: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:23:71: error: 'builtInWideAngleCamera' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
| |- error: 'builtInWideAngleCamera' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:25:34: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
26 |
27 | for device in devices {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:25:58: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
26 |
27 | for device in devices {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:50:35: error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
47 | func _captureInput() -> Result<AVCaptureDeviceInput, Error> {
| `- note: add '@available' attribute to enclosing instance method
48 |
49 | do {
50 | let deviceInput = try AVCaptureDeviceInput(device: self)
| |- error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
51 | return .success(deviceInput)
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:60:27: error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
57 | /// [取得鏡頭縮放範圍](https://developer.apple.com/documentation/avfoundation/avcapturedevice/2865758-maxavailablevideozoomfactor)
58 | /// - Returns: CameraZoomRange
59 | func _zoomRange() -> Constant.CameraZoomRange {
| `- note: add '@available' attribute to enclosing instance method
60 | return (max: self.maxAvailableVideoZoomFactor, min: self.minAvailableVideoZoomFactor)
| |- error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
61 | }
62 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:60:66: error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
57 | /// [取得鏡頭縮放範圍](https://developer.apple.com/documentation/avfoundation/avcapturedevice/2865758-maxavailablevideozoomfactor)
58 | /// - Returns: CameraZoomRange
59 | func _zoomRange() -> Constant.CameraZoomRange {
| `- note: add '@available' attribute to enclosing instance method
60 | return (max: self.maxAvailableVideoZoomFactor, min: self.minAvailableVideoZoomFactor)
| |- error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
61 | }
62 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:70:34: error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
66 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
67 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
68 | func _zoomIn(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
69 |
70 | let maxZoomFactor = self.maxAvailableVideoZoomFactor
| |- error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
71 | let currentVideoZoomFactor = self.videoZoomFactor
72 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:71:43: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
66 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
67 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
68 | func _zoomIn(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
69 |
70 | let maxZoomFactor = self.maxAvailableVideoZoomFactor
71 | let currentVideoZoomFactor = self.videoZoomFactor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
72 |
73 | if (maxZoomFactor < currentVideoZoomFactor) { return .success(nil) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:85:34: error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
81 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
82 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
83 | func _zoomOut(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
84 |
85 | let minZoomFactor = self.minAvailableVideoZoomFactor
| |- error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
86 | let currentVideoZoomFactor = self.videoZoomFactor
87 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:86:43: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
81 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
82 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
83 | func _zoomOut(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
84 |
85 | let minZoomFactor = self.minAvailableVideoZoomFactor
86 | let currentVideoZoomFactor = self.videoZoomFactor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
87 |
88 | if (currentVideoZoomFactor < minZoomFactor) { return .success(nil) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:104:22: error: 'ramp(toVideoZoomFactor:withRate:)' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
97 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
98 | /// - Returns: Result<Bool, Error>
99 | func _zoom(with rate: CGFloat, factor: CGFloat, isSmooth: Bool = false) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
100 |
101 | let result = self._lockForConfiguration { () -> CGFloat? in
102 |
103 | if (isSmooth) {
104 | self.ramp(toVideoZoomFactor: factor, withRate: Float(rate))
| |- error: 'ramp(toVideoZoomFactor:withRate:)' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
105 | } else {
106 | self.videoZoomFactor = factor
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:106:22: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
97 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
98 | /// - Returns: Result<Bool, Error>
99 | func _zoom(with rate: CGFloat, factor: CGFloat, isSmooth: Bool = false) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
100 |
101 | let result = self._lockForConfiguration { () -> CGFloat? in
:
104 | self.ramp(toVideoZoomFactor: factor, withRate: Float(rate))
105 | } else {
106 | self.videoZoomFactor = factor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
107 | }
108 |
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile Extension+.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:109:25: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
97 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
98 | /// - Returns: Result<Bool, Error>
99 | func _zoom(with rate: CGFloat, factor: CGFloat, isSmooth: Bool = false) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
100 |
101 | let result = self._lockForConfiguration { () -> CGFloat? in
:
107 | }
108 |
109 | return self.videoZoomFactor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
110 | }
111 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:134:18: error: 'automaticallyAdjustsVideoHDREnabled' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
128 | /// - Parameter isEnable: Bool
129 | /// - Returns: Result<Bool, Error>
130 | func _HDR(isEnable: Bool = true) -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
131 |
132 | let result = self._lockForConfiguration { () -> Bool in
133 |
134 | self.automaticallyAdjustsVideoHDREnabled = false
| |- error: 'automaticallyAdjustsVideoHDREnabled' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
135 | self.isVideoHDREnabled = isEnable
136 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:135:18: error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
128 | /// - Parameter isEnable: Bool
129 | /// - Returns: Result<Bool, Error>
130 | func _HDR(isEnable: Bool = true) -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
131 |
132 | let result = self._lockForConfiguration { () -> Bool in
133 |
134 | self.automaticallyAdjustsVideoHDREnabled = false
135 | self.isVideoHDREnabled = isEnable
| |- error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
136 |
137 | return self.isVideoHDREnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:137:25: error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
128 | /// - Parameter isEnable: Bool
129 | /// - Returns: Result<Bool, Error>
130 | func _HDR(isEnable: Bool = true) -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
131 |
132 | let result = self._lockForConfiguration { () -> Bool in
:
135 | self.isVideoHDREnabled = isEnable
136 |
137 | return self.isVideoHDREnabled
| |- error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
138 | }
139 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:168:28: error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
164 | /// - videoGravity: AVLayerVideoGravity => .resizeAspectFill
165 | /// - Returns: AVCaptureVideoPreviewLayer
166 | func _previewLayer(with frame: CGRect, videoGravity: AVLayerVideoGravity = .resizeAspectFill) -> AVCaptureVideoPreviewLayer {
| `- note: add '@available' attribute to enclosing instance method
167 |
168 | let previewLayer = AVCaptureVideoPreviewLayer(session: self)
| |- error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
169 |
170 | previewLayer.frame = frame
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:224:33: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
219 | /// 切換前後鏡頭 (isRunning才會換)
220 | /// - Returns: Result<Bool, Error>
221 | func _switchCamera() -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
222 |
223 | guard isRunning,
224 | let frontCamera = AVCaptureDevice._wideAngleCamera().front,
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
225 | let backCamera = AVCaptureDevice._wideAngleCamera().back
226 | else {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:225:32: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
219 | /// 切換前後鏡頭 (isRunning才會換)
220 | /// - Returns: Result<Bool, Error>
221 | func _switchCamera() -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
222 |
223 | guard isRunning,
224 | let frontCamera = AVCaptureDevice._wideAngleCamera().front,
225 | let backCamera = AVCaptureDevice._wideAngleCamera().back
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
226 | else {
227 | return .failure(Constant.MyError.isNotRunning)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:242:24: error: cannot assign value of type 'Result<Bool, any Error>' to type 'Result<Bool, Never>'
240 | case .front:
241 | _removeInputs([_input])
242 | result = _canAddDevices(with: [backCamera]); return
| |- error: cannot assign value of type 'Result<Bool, any Error>' to type 'Result<Bool, Never>'
| `- note: arguments to generic parameter 'Failure' ('any Error' and 'Never') are expected to be equal
243 | case .back:
244 | _removeInputs([_input])
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:250:16: error: cannot convert return expression of type 'Result<Bool, Never>' to return type 'Result<Bool, any Error>'
248 | }
249 |
250 | return result
| |- error: cannot convert return expression of type 'Result<Bool, Never>' to return type 'Result<Bool, any Error>'
| `- note: arguments to generic parameter 'Failure' ('Never' and 'any Error') are expected to be equal
251 | }
252 | }
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/ExplicitPrecompiledModules
2026-09-20 22:45:25.245 xcodebuild[717:4409] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
** BUILD FAILED **
The following build commands failed:
SwiftCompile normal arm64 (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
SwiftEmitModule normal arm64 Emitting\ module\ for\ WWCameraPickerController (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
Building workspace WWCameraPickerController with scheme WWCameraPickerController
(3 failures)
Command line invocation:
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/usr/bin/xcodebuild -IDEClonedSourcePackagesDirPathOverride=/Users/admin/builder/spi-builder-workspace/.dependencies -resolvePackageDependencies
Resolve Package Graph
Resolved source packages:
WWCameraPickerController: /Users/admin/builder/spi-builder-workspace
resolved source packages: WWCameraPickerController
2026-09-20 22:45:31.370 xcodebuild[810:4785] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
{
"dependencies" : [
],
"manifest_display_name" : "WWCameraPickerController",
"name" : "WWCameraPickerController",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "14.0"
}
],
"products" : [
{
"name" : "WWCameraPickerController",
"targets" : [
"WWCameraPickerController"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"swift_languages_versions" : [
"5"
],
"targets" : [
{
"c99name" : "WWCameraPickerController",
"module_type" : "SwiftTarget",
"name" : "WWCameraPickerController",
"path" : "Sources/WWCameraPickerController",
"product_memberships" : [
"WWCameraPickerController"
],
"resources" : [
{
"path" : "/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Privacy",
"rule" : {
"copy" : {
}
}
}
],
"sources" : [
"Constant.swift",
"Extension+.swift",
"WWCameraPickerController.swift"
],
"type" : "library"
}
],
"tools_version" : "5.6"
}
{
"workspace" : {
"name" : "WWCameraPickerController",
"schemes" : [
"WWCameraPickerController"
]
}
}
2026-09-20 22:45:32.581 xcodebuild[818:4849] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-27.0.0-Release.Candidate.app xcrun xcodebuild -IDEClonedSourcePackagesDirPathOverride=$PWD/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath $PWD/.derivedData build -scheme WWCameraPickerController -destination generic/platform=tvOS
Command line invocation:
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/usr/bin/xcodebuild -IDEClonedSourcePackagesDirPathOverride=/Users/admin/builder/spi-builder-workspace/.dependencies -skipMacroValidation -skipPackagePluginValidation -derivedDataPath /Users/admin/builder/spi-builder-workspace/.derivedData build -scheme WWCameraPickerController -destination generic/platform=tvOS
Resolve Package Graph
Resolved source packages:
WWCameraPickerController: /Users/admin/builder/spi-builder-workspace
ComputePackagePrebuildTargetDependencyGraph
Prepare packages
CreateBuildRequest
SendProjectDescription
CreateBuildOperation
ComputeTargetDependencyGraph
note: Building targets in dependency order
note: Target dependency graph (3 targets)
Target 'WWCameraPickerController-product' in project 'WWCameraPickerController'
➜ Explicit dependency on target 'WWCameraPickerController' in project 'WWCameraPickerController'
➜ Explicit dependency on target 'WWCameraPickerController_WWCameraPickerController' in project 'WWCameraPickerController'
Target 'WWCameraPickerController' in project 'WWCameraPickerController'
➜ Explicit dependency on target 'WWCameraPickerController_WWCameraPickerController' in project 'WWCameraPickerController'
Target 'WWCameraPickerController_WWCameraPickerController' in project 'WWCameraPickerController' (no dependencies)
GatherProvisioningInputs
CreateBuildDescription
ClangStatCache /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/appletvos27.0-24J360-e829b21a6f8c9b70876ba0858053c044b32bfd8d43560033f8d89884cdb90028.sdkstatcache
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk -o /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/appletvos27.0-24J360-e829b21a6f8c9b70876ba0858053c044b32bfd8d43560033f8d89884cdb90028.sdkstatcache
SwiftDriver WWCameraPickerController normal arm64 com.apple.xcode.tools.swift.compiler (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftDriver -- /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -parse-as-library -module-name WWCameraPickerController -Onone @/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController.SwiftFileList -DSWIFT_PACKAGE -DDEBUG -DSWIFT_MODULE_RESOURCE_BUNDLE_AVAILABLE -DXcode -plugin-path /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/testing -enable-experimental-feature DebugDescriptionMacro -sdk /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk -target arm64-apple-tvos15.0 -g -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex -Xfrontend -serialize-debugging-options -enable-testing -index-store-path /Users/admin/builder/spi-builder-workspace/.derivedData/Index.noindex/DataStore -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -swift-version 5 -I /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-appletvos -Isystem /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/lib -F /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-appletvos -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/Frameworks -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/Developer/Library/Frameworks -c -j10 -enable-batch-mode -incremental -Xcc -ivfsstatcache -Xcc /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/appletvos27.0-24J360-e829b21a6f8c9b70876ba0858053c044b32bfd8d43560033f8d89884cdb90028.sdkstatcache -output-file-map /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController-OutputFileMap.json -save-temps -no-color-diagnostics -explicit-module-build -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -clang-scanner-module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex -sdk-module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules -emit-dependencies -emit-module -emit-module-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController.swiftmodule -serialize-diagnostics -dependency-scan-serialize-diagnostics-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController-dependency-scan.dia -validate-clang-modules-once -clang-build-session-file /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -fmodules-prune-interval\=86400 -Xcc -fmodules-prune-after\=345600 -emit-const-values -const-gather-protocols-list /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController_const_extract_protocols.json -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-appletvos/include -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources-normal/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -emit-objc-header -emit-objc-header-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController-Swift.h -working-directory /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -experimental-emit-module-separately -disable-cmo
SwiftEmitModule normal arm64 Emitting\ module\ for\ WWCameraPickerController (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Constant.swift:18:41: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
14 |
15 | // MARK: - typealias
16 | extension Constant {
| `- note: add '@available' attribute to enclosing extension
17 | typealias ScreenBoundsInfomation = (width: CGFloat, height: CGFloat, scale: CGFloat) // iPhone的裝置螢幕大小 (寬/高/比例)
18 | typealias WideAngleCamera = (front: AVCaptureDevice?, back: AVCaptureDevice?) // 前後鏡頭
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing type alias
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Constant.swift:18:65: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
14 |
15 | // MARK: - typealias
16 | extension Constant {
| `- note: add '@available' attribute to enclosing extension
17 | typealias ScreenBoundsInfomation = (width: CGFloat, height: CGFloat, scale: CGFloat) // iPhone的裝置螢幕大小 (寬/高/比例)
18 | typealias WideAngleCamera = (front: AVCaptureDevice?, back: AVCaptureDevice?) // 前後鏡頭
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing type alias
19 | }
20 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:17:52: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
17 | static func _default(for type: AVMediaType) -> AVCaptureDevice? { return AVCaptureDevice.default(for: type) }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing static method
18 |
19 | /// 取得前後相機 => AVCaptureDevice
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:14:11: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:44:30: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
44 | func _videoPosition() -> AVCaptureDevice.Position { return self.position }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:47:36: error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
47 | func _captureInput() -> Result<AVCaptureDeviceInput, Error> {
| | `- error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
48 |
49 | do {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:41:11: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:166:102: error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
164 | /// - videoGravity: AVLayerVideoGravity => .resizeAspectFill
165 | /// - Returns: AVCaptureVideoPreviewLayer
166 | func _previewLayer(with frame: CGRect, videoGravity: AVLayerVideoGravity = .resizeAspectFill) -> AVCaptureVideoPreviewLayer {
| | `- error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
167 |
168 | let previewLayer = AVCaptureVideoPreviewLayer(session: self)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:179:32: error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
177 | /// - Parameter input: AVCaptureInput
178 | /// - Returns: Bool
179 | func _canAddInput(_ input: AVCaptureInput) -> Bool {
| | `- error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
180 | guard self.canAddInput(input) else { return false }
181 | self.addInput(input); return true
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:187:40: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
185 | /// - Parameter types: Set<AVMediaType> => [.audio, .video]
186 | /// - Returns: Result<Bool, Error>
187 | func _canAddDevices(with devices: [AVCaptureDevice]) -> Result<Bool, Error> {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
188 |
189 | var isSuccess = false
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:209:34: error: 'AVCaptureOutput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
207 | /// - Parameter input: AVCaptureOutput
208 | /// - Returns: Bool
209 | func _canAddOutput(_ output: AVCaptureOutput) -> Bool {
| | `- error: 'AVCaptureOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
210 | guard self.canAddOutput(output) else { return false }
211 | self.addOutput(output); return true
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:215:35: error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
213 |
214 | /// 清除[AVCaptureInput]
215 | func _removeInputs(_ inputs: [AVCaptureInput]) {
| | `- error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
216 | for input in inputs { self.removeInput(input) }
217 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:159:11: error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| | `- error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:263:78: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
261 | /// - delegate: AVCapturePhotoCaptureDelegate
262 | /// - completion: (() -> Void)?
263 | func _capturePhoto(isHighResolutionPhotoEnabled: Bool = true, flashMode: AVCaptureDevice.FlashMode = .auto, delegate: AVCapturePhotoCaptureDelegate, completion: (() -> Void)? = nil) {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
264 |
265 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:263:123: error: 'AVCapturePhotoCaptureDelegate' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
261 | /// - delegate: AVCapturePhotoCaptureDelegate
262 | /// - completion: (() -> Void)?
263 | func _capturePhoto(isHighResolutionPhotoEnabled: Bool = true, flashMode: AVCaptureDevice.FlashMode = .auto, delegate: AVCapturePhotoCaptureDelegate, completion: (() -> Void)? = nil) {
| | `- error: 'AVCapturePhotoCaptureDelegate' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
264 |
265 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:280:71: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
278 | /// - isHighResolutionPhotoEnabled: 高解析度
279 | /// - quality: 拍照品質
280 | func _setting(isHighResolutionPhotoEnabled: Bool = true, quality: AVCapturePhotoOutput.QualityPrioritization) -> Self {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
281 |
282 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:255:11: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:35: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:115: error: 'UIImagePickerController' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:308: error: 'UIImagePickerController' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:327:42: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
325 | /// - tintColor: NavigationBar的TintColor
326 | /// - Returns: UIImagePickerController
327 | static func _photoLibrary(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
328 | return Self._build(delegate: delegate, sourceType: .photoLibrary, mediaTypes: [.image], modalTransitionStyle: modalTransitionStyle, allowsEditing: allowsEditing, tintColor: tintColor)
329 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:327:245: error: 'UIImagePickerController' is unavailable in tvOS
325 | /// - tintColor: NavigationBar的TintColor
326 | /// - Returns: UIImagePickerController
327 | static func _photoLibrary(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
328 | return Self._build(delegate: delegate, sourceType: .photoLibrary, mediaTypes: [.image], modalTransitionStyle: modalTransitionStyle, allowsEditing: allowsEditing, tintColor: tintColor)
329 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:295:11: error: 'UIImagePickerController' is unavailable in tvOS
293 |
294 | // MARK: - UIImagePickerController (static function)
295 | extension UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
296 |
297 | /// 產生UIImagePickerController基本型
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:20:34: error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
18 | public var isRunning: Bool { captureSession.isRunning }
19 |
20 | private let captureSession = AVCaptureSession()
| `- error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
21 | private let capturePhotoOutput = AVCapturePhotoOutput()
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:21:38: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
19 |
20 | private let captureSession = AVCaptureSession()
21 | private let capturePhotoOutput = AVCapturePhotoOutput()
| `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
23 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:22:42: error: 'AVCaptureMovieFileOutput' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
20 | private let captureSession = AVCaptureSession()
21 | private let capturePhotoOutput = AVCapturePhotoOutput()
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
| `- error: 'AVCaptureMovieFileOutput' is only available in tvOS 17.0 or newer
23 |
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:24:34: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
23 |
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
| `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:25:31: error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
23 |
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
| `- error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
27 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:26:48: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
| `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
27 |
28 | private var takePhotoClosure: ((Result<AVCapturePhoto, Error>) -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:26:108: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
| `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
27 |
28 | private var takePhotoClosure: ((Result<AVCapturePhoto, Error>) -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:28:44: error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
27 |
28 | private var takePhotoClosure: ((Result<AVCapturePhoto, Error>) -> Void)?
| `- error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
29 | private var takeMovieClosure: ((Result<Bool, Error>) -> Void)?
30 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:40:39: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
36 |
37 | // MARK: - AVCapturePhotoCaptureDelegate
38 | extension WWCameraViewController: AVCapturePhotoCaptureDelegate {
| `- note: add '@available' attribute to enclosing extension
39 |
40 | public func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
41 | if let error = error { takePhotoClosure?(.failure(error)); return }
42 | takePhotoClosure?(.success(photo))
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:40:93: error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
36 |
37 | // MARK: - AVCapturePhotoCaptureDelegate
38 | extension WWCameraViewController: AVCapturePhotoCaptureDelegate {
| `- note: add '@available' attribute to enclosing extension
39 |
40 | public func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
| | `- error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
41 | if let error = error { takePhotoClosure?(.failure(error)); return }
42 | takePhotoClosure?(.success(photo))
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:49:38: error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
45 |
46 | // MARK: - AVCaptureFileOutputRecordingDelegate
47 | extension WWCameraViewController: AVCaptureFileOutputRecordingDelegate {
| `- note: add '@available' attribute to enclosing extension
48 |
49 | public func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
50 | fileOutputAction(output, didFinishRecordingTo: outputFileURL, from: connections, error: error)
51 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:49:119: error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
45 |
46 | // MARK: - AVCaptureFileOutputRecordingDelegate
47 | extension WWCameraViewController: AVCaptureFileOutputRecordingDelegate {
| `- note: add '@available' attribute to enclosing extension
48 |
49 | public func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
50 | fileOutputAction(output, didFinishRecordingTo: outputFileURL, from: connections, error: error)
51 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:90:49: error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
88 | /// 取得拍攝相片的相關資訊
89 | /// - Parameter photo: Result<AVCapturePhoto, Error>
90 | func takePhoto(_ result: @escaping ((Result<AVCapturePhoto, Error>) -> Void)) { takePhotoClosure = result }
| | `- error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
91 |
92 | /// 取得錄影的相關資訊
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:114:49: error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
112 | /// - sessionPreset: [AVCaptureSession.Preset - 4:3 (.photo) / 16:9 (.high)](https://www.jianshu.com/p/9e1661805d74)
113 | /// - videoGravity: [AVLayerVideoGravity - 滿版 (.resizeAspectFill) / 比例 (.resizeAspect)]
114 | func previewLayerRateSetting(sessionPreset: AVCaptureSession.Preset = .photo, videoGravity: AVLayerVideoGravity = .resizeAspect) {
| | `- error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
115 | captureSession.sessionPreset = sessionPreset
116 | previewLayer?.videoGravity = videoGravity
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:114:76: error: 'photo' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
112 | /// - sessionPreset: [AVCaptureSession.Preset - 4:3 (.photo) / 16:9 (.high)](https://www.jianshu.com/p/9e1661805d74)
113 | /// - videoGravity: [AVLayerVideoGravity - 滿版 (.resizeAspectFill) / 比例 (.resizeAspect)]
114 | func previewLayerRateSetting(sessionPreset: AVCaptureSession.Preset = .photo, videoGravity: AVLayerVideoGravity = .resizeAspect) {
| | `- error: 'photo' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
115 | captureSession.sessionPreset = sessionPreset
116 | previewLayer?.videoGravity = videoGravity
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:149:27: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
147 | /// - animated: Bool
148 | /// - completion: (() -> Void)?
149 | func album(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, animated: Bool = true, completion: (() -> Void)? = nil) {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
150 | let imagePickerController = UIImagePickerController._photoLibrary(delegate: delegate)
151 | self.present(imagePickerController, animated: animated) { completion?() }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:160:45: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
154 |
155 | // MARK: - 開放使用的函數 (設定)
156 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 設定一開始的鏡頭位置 (設定一開始起動的鏡頭位置)
159 | /// - Parameter defaultPosition: AVCaptureDevice.Position
160 | func defaultPosition(_ defaultPosition: AVCaptureDevice.Position) {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
161 | self.defaultPosition = defaultPosition
162 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:166:40: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
154 |
155 | // MARK: - 開放使用的函數 (設定)
156 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 設定一開始的鏡頭位置 (設定一開始起動的鏡頭位置)
:
164 | /// 設定閃光燈模式
165 | /// - Parameter flashMode: AVCaptureDevice.FlashMode
166 | func flashModeSetting(_ flashMode: AVCaptureDevice.FlashMode = .auto) { cameraModeSetting.flashMode = flashMode }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
167 |
168 | /// 設定使用高解析度模式
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:174:36: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
154 |
155 | // MARK: - 開放使用的函數 (設定)
156 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 設定一開始的鏡頭位置 (設定一開始起動的鏡頭位置)
:
172 | /// 設定拍照品質
173 | /// - Parameter quality: AVCapturePhotoOutput.QualityPrioritization
174 | func qualitySetting(_ quality: AVCapturePhotoOutput.QualityPrioritization = .quality) { cameraModeSetting.quality = quality }
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
175 | }
176 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:189:33: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
187 | /// - Parameter position: AVCaptureDevice.Position
188 | /// - Returns: Bool
189 | func photoSetting(position: AVCaptureDevice.Position) -> Bool {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
190 |
191 | guard let device = defaultCamera(position: position),
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:209:34: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:209:78: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:250:37: error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
248 | /// - connections: [AVCaptureConnection]
249 | /// - error: Error?
250 | func fileOutputAction(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
251 |
252 | if let error = error { self.takeMovieClosure?(.failure(error)) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:250:118: error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
248 | /// - connections: [AVCaptureConnection]
249 | /// - error: Error?
250 | func fileOutputAction(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
251 |
252 | if let error = error { self.takeMovieClosure?(.failure(error)) }
Failed frontend command:
SwiftCompile normal arm64 (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources/resource_bundle_accessor.swift /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Constant.swift /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift -target arm64-apple-tvos15.0 -disable-cross-import-overlay-search -swift-module-cross-import Photos /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Photos.framework/Modules/Photos.swiftcrossimport/AppIntents.swiftoverlay -swift-module-cross-import Photos /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/Photos.framework/Modules/Photos.swiftcrossimport/AppIntents.swiftoverlay -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/lib/swift/host/plugins/libFoundationMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/bin/swift-plugin-server\#FoundationMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/lib/swift/host/plugins/libObservationMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/bin/swift-plugin-server\#ObservationMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/lib/swift/host/plugins/libPreviewsMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/bin/swift-plugin-server\#PreviewsMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/lib/swift/host/plugins/libSwiftMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/bin/swift-plugin-server\#SwiftMacros -load-resolved-plugin /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/lib/swift/host/plugins/libSwiftUIMacros.dylib\#/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/bin/swift-plugin-server\#SwiftUIMacros -disable-implicit-swift-modules -Xcc -fno-implicit-modules -Xcc -fno-implicit-module-maps -explicit-swift-module-map-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController-dependencies-1.json -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk -I /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-appletvos -Isystem /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/lib -F /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-appletvos -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/Frameworks -F /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/Developer/Library/Frameworks -module-cache-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules -no-color-diagnostics -Xcc -fno-color-diagnostics -enable-testing -g -debug-info-format\=dwarf -dwarf-version\=4 -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -D SWIFT_MODULE_RESOURCE_BUNDLE_AVAILABLE -D Xcode -serialize-debugging-options -enable-experimental-feature DebugDescriptionMacro -empty-abi-descriptor -validate-clang-modules-once -clang-build-session-file /Users/admin/builder/spi-builder-workspace/.derivedData/ModuleCache.noindex/Session.modulevalidation -Xcc -working-directory -Xcc /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -enable-anonymous-context-mangled-names -file-compilation-dir /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode -Xcc -D_LIBCPP_HARDENING_MODE\=_LIBCPP_HARDENING_MODE_DEBUG -Xcc -ivfsstatcache -Xcc /Users/admin/builder/spi-builder-workspace/.derivedData/SDKStatCaches.noindex/appletvos27.0-24J360-e829b21a6f8c9b70876ba0858053c044b32bfd8d43560033f8d89884cdb90028.sdkstatcache -Xcc -fmodules-prune-interval\=86400 -Xcc -fmodules-prune-after\=345600 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Products/Debug-appletvos/include -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources-normal/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources/arm64 -Xcc -I/Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources -Xcc -DSWIFT_PACKAGE -Xcc -DDEBUG\=1 -no-auto-bridging-header-chaining -module-name WWCameraPickerController -const-gather-protocols-file /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController_const_extract_protocols.json -disable-clang-spi -clang-target arm64-apple-tvos27.0 -target-sdk-version 27.0 -target-sdk-name appletvos27.0 -in-process-plugin-server-path /Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -emit-module-doc-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController.swiftdoc -emit-module-source-info-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController.swiftsourceinfo -emit-objc-header-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController-Swift.h -serialize-diagnostics-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController-primary-emit-module.dia -emit-dependencies-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController-primary-emit-module.d -parse-as-library -o /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController.swiftmodule -emit-abi-descriptor-path /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/Objects-normal/arm64/WWCameraPickerController.abi.json
SwiftCompile normal arm64 Compiling\ Extension+.swift /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:17:52: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
17 | static func _default(for type: AVMediaType) -> AVCaptureDevice? { return AVCaptureDevice.default(for: type) }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing static method
18 |
19 | /// 取得前後相機 => AVCaptureDevice
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:14:11: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:44:30: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
44 | func _videoPosition() -> AVCaptureDevice.Position { return self.position }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:47:36: error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
47 | func _captureInput() -> Result<AVCaptureDeviceInput, Error> {
| | `- error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
48 |
49 | do {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:41:11: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:166:102: error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
164 | /// - videoGravity: AVLayerVideoGravity => .resizeAspectFill
165 | /// - Returns: AVCaptureVideoPreviewLayer
166 | func _previewLayer(with frame: CGRect, videoGravity: AVLayerVideoGravity = .resizeAspectFill) -> AVCaptureVideoPreviewLayer {
| | `- error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
167 |
168 | let previewLayer = AVCaptureVideoPreviewLayer(session: self)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:179:32: error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
177 | /// - Parameter input: AVCaptureInput
178 | /// - Returns: Bool
179 | func _canAddInput(_ input: AVCaptureInput) -> Bool {
| | `- error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
180 | guard self.canAddInput(input) else { return false }
181 | self.addInput(input); return true
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:187:40: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
185 | /// - Parameter types: Set<AVMediaType> => [.audio, .video]
186 | /// - Returns: Result<Bool, Error>
187 | func _canAddDevices(with devices: [AVCaptureDevice]) -> Result<Bool, Error> {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
188 |
189 | var isSuccess = false
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:209:34: error: 'AVCaptureOutput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
207 | /// - Parameter input: AVCaptureOutput
208 | /// - Returns: Bool
209 | func _canAddOutput(_ output: AVCaptureOutput) -> Bool {
| | `- error: 'AVCaptureOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
210 | guard self.canAddOutput(output) else { return false }
211 | self.addOutput(output); return true
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:215:35: error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
213 |
214 | /// 清除[AVCaptureInput]
215 | func _removeInputs(_ inputs: [AVCaptureInput]) {
| | `- error: 'AVCaptureInput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
216 | for input in inputs { self.removeInput(input) }
217 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:159:11: error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| | `- error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:263:78: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
261 | /// - delegate: AVCapturePhotoCaptureDelegate
262 | /// - completion: (() -> Void)?
263 | func _capturePhoto(isHighResolutionPhotoEnabled: Bool = true, flashMode: AVCaptureDevice.FlashMode = .auto, delegate: AVCapturePhotoCaptureDelegate, completion: (() -> Void)? = nil) {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
264 |
265 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:263:123: error: 'AVCapturePhotoCaptureDelegate' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
261 | /// - delegate: AVCapturePhotoCaptureDelegate
262 | /// - completion: (() -> Void)?
263 | func _capturePhoto(isHighResolutionPhotoEnabled: Bool = true, flashMode: AVCaptureDevice.FlashMode = .auto, delegate: AVCapturePhotoCaptureDelegate, completion: (() -> Void)? = nil) {
| | `- error: 'AVCapturePhotoCaptureDelegate' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
264 |
265 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:280:71: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
:
278 | /// - isHighResolutionPhotoEnabled: 高解析度
279 | /// - quality: 拍照品質
280 | func _setting(isHighResolutionPhotoEnabled: Bool = true, quality: AVCapturePhotoOutput.QualityPrioritization) -> Self {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
281 |
282 | self.isHighResolutionCaptureEnabled = isHighResolutionPhotoEnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:255:11: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
253 |
254 | // MARK: - AVCapturePhotoOutput (class function)
255 | extension AVCapturePhotoOutput {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing extension
256 |
257 | /// 擷圖 => 拍照 => photoOutput(_:didFinishProcessingPhoto:error:)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:35: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:115: error: 'UIImagePickerController' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:306:308: error: 'UIImagePickerController' is unavailable in tvOS
304 | /// - tintColor: NavigationBar的TintColor
305 | /// - Returns: UIImagePickerController
306 | static func _build(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)?, sourceType: UIImagePickerController.SourceType, mediaTypes: [Constant.UTI], modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
307 |
308 | let pickerController = UIImagePickerController()
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:327:42: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
325 | /// - tintColor: NavigationBar的TintColor
326 | /// - Returns: UIImagePickerController
327 | static func _photoLibrary(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
328 | return Self._build(delegate: delegate, sourceType: .photoLibrary, mediaTypes: [.image], modalTransitionStyle: modalTransitionStyle, allowsEditing: allowsEditing, tintColor: tintColor)
329 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:327:245: error: 'UIImagePickerController' is unavailable in tvOS
325 | /// - tintColor: NavigationBar的TintColor
326 | /// - Returns: UIImagePickerController
327 | static func _photoLibrary(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, modalTransitionStyle: UIModalTransitionStyle = .coverVertical, allowsEditing: Bool = false, tintColor: UIColor = .systemBlue) -> UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
328 | return Self._build(delegate: delegate, sourceType: .photoLibrary, mediaTypes: [.image], modalTransitionStyle: modalTransitionStyle, allowsEditing: allowsEditing, tintColor: tintColor)
329 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:295:11: error: 'UIImagePickerController' is unavailable in tvOS
293 |
294 | // MARK: - UIImagePickerController (static function)
295 | extension UIImagePickerController {
| `- error: 'UIImagePickerController' is unavailable in tvOS
296 |
297 | /// 產生UIImagePickerController基本型
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:17:78: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
17 | static func _default(for type: AVMediaType) -> AVCaptureDevice? { return AVCaptureDevice.default(for: type) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing static method
18 |
19 | /// 取得前後相機 => AVCaptureDevice
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:23:23: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:23:71: error: 'builtInWideAngleCamera' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
| |- error: 'builtInWideAngleCamera' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:25:34: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
26 |
27 | for device in devices {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:25:58: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
12 |
13 | // MARK: - AVCaptureDevice (static function)
14 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
15 |
16 | /// 取得預設影音裝置 (NSCameraUsageDescription / NSMicrophoneUsageDescription)
:
19 | /// 取得前後相機 => AVCaptureDevice
20 | /// - Returns: Constant.WideAngleCamera
21 | static func _wideAngleCamera() -> Constant.WideAngleCamera {
| `- note: add '@available' attribute to enclosing static method
22 |
23 | let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
24 |
25 | var videoDeivce: (front: AVCaptureDevice?, back: AVCaptureDevice?) = (nil, nil)
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
26 |
27 | for device in devices {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:50:35: error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
45 |
46 | /// 取得裝置的Input => NSCameraUsageDescription / NSMicrophoneUsageDescription
47 | func _captureInput() -> Result<AVCaptureDeviceInput, Error> {
| `- note: add '@available' attribute to enclosing instance method
48 |
49 | do {
50 | let deviceInput = try AVCaptureDeviceInput(device: self)
| |- error: 'AVCaptureDeviceInput' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
51 | return .success(deviceInput)
52 | } catch {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:60:27: error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
57 | /// [取得鏡頭縮放範圍](https://developer.apple.com/documentation/avfoundation/avcapturedevice/2865758-maxavailablevideozoomfactor)
58 | /// - Returns: CameraZoomRange
59 | func _zoomRange() -> Constant.CameraZoomRange {
| `- note: add '@available' attribute to enclosing instance method
60 | return (max: self.maxAvailableVideoZoomFactor, min: self.minAvailableVideoZoomFactor)
| |- error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
61 | }
62 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:60:66: error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
57 | /// [取得鏡頭縮放範圍](https://developer.apple.com/documentation/avfoundation/avcapturedevice/2865758-maxavailablevideozoomfactor)
58 | /// - Returns: CameraZoomRange
59 | func _zoomRange() -> Constant.CameraZoomRange {
| `- note: add '@available' attribute to enclosing instance method
60 | return (max: self.maxAvailableVideoZoomFactor, min: self.minAvailableVideoZoomFactor)
| |- error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
61 | }
62 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:70:34: error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
66 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
67 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
68 | func _zoomIn(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
69 |
70 | let maxZoomFactor = self.maxAvailableVideoZoomFactor
| |- error: 'maxAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
71 | let currentVideoZoomFactor = self.videoZoomFactor
72 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:71:43: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
66 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
67 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
68 | func _zoomIn(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
69 |
70 | let maxZoomFactor = self.maxAvailableVideoZoomFactor
71 | let currentVideoZoomFactor = self.videoZoomFactor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
72 |
73 | if (maxZoomFactor < currentVideoZoomFactor) { return .success(nil) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:85:34: error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
81 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
82 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
83 | func _zoomOut(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
84 |
85 | let minZoomFactor = self.minAvailableVideoZoomFactor
| |- error: 'minAvailableVideoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
86 | let currentVideoZoomFactor = self.videoZoomFactor
87 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:86:43: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
81 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
82 | /// - Returns: Result<CGFloat?, Error> => 回傳videoZoomFactor
83 | func _zoomOut(with rate: CGFloat, isSmooth: Bool = true) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
84 |
85 | let minZoomFactor = self.minAvailableVideoZoomFactor
86 | let currentVideoZoomFactor = self.videoZoomFactor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
87 |
88 | if (currentVideoZoomFactor < minZoomFactor) { return .success(nil) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:104:22: error: 'ramp(toVideoZoomFactor:withRate:)' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
97 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
98 | /// - Returns: Result<Bool, Error>
99 | func _zoom(with rate: CGFloat, factor: CGFloat, isSmooth: Bool = false) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
100 |
101 | let result = self._lockForConfiguration { () -> CGFloat? in
102 |
103 | if (isSmooth) {
104 | self.ramp(toVideoZoomFactor: factor, withRate: Float(rate))
| |- error: 'ramp(toVideoZoomFactor:withRate:)' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
105 | } else {
106 | self.videoZoomFactor = factor
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:106:22: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
97 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
98 | /// - Returns: Result<Bool, Error>
99 | func _zoom(with rate: CGFloat, factor: CGFloat, isSmooth: Bool = false) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
100 |
101 | let result = self._lockForConfiguration { () -> CGFloat? in
:
104 | self.ramp(toVideoZoomFactor: factor, withRate: Float(rate))
105 | } else {
106 | self.videoZoomFactor = factor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
107 | }
108 |
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile Extension+.swift
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:109:25: error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
97 | /// - isSmooth: [是否要平滑縮放?](https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera)
98 | /// - Returns: Result<Bool, Error>
99 | func _zoom(with rate: CGFloat, factor: CGFloat, isSmooth: Bool = false) -> Result<CGFloat?, Error> {
| `- note: add '@available' attribute to enclosing instance method
100 |
101 | let result = self._lockForConfiguration { () -> CGFloat? in
:
107 | }
108 |
109 | return self.videoZoomFactor
| |- error: 'videoZoomFactor' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
110 | }
111 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:134:18: error: 'automaticallyAdjustsVideoHDREnabled' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
128 | /// - Parameter isEnable: Bool
129 | /// - Returns: Result<Bool, Error>
130 | func _HDR(isEnable: Bool = true) -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
131 |
132 | let result = self._lockForConfiguration { () -> Bool in
133 |
134 | self.automaticallyAdjustsVideoHDREnabled = false
| |- error: 'automaticallyAdjustsVideoHDREnabled' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
135 | self.isVideoHDREnabled = isEnable
136 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:135:18: error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
128 | /// - Parameter isEnable: Bool
129 | /// - Returns: Result<Bool, Error>
130 | func _HDR(isEnable: Bool = true) -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
131 |
132 | let result = self._lockForConfiguration { () -> Bool in
133 |
134 | self.automaticallyAdjustsVideoHDREnabled = false
135 | self.isVideoHDREnabled = isEnable
| |- error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
136 |
137 | return self.isVideoHDREnabled
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:137:25: error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
39 |
40 | // MARK: - AVCaptureDevice (class function)
41 | extension AVCaptureDevice {
| `- note: add '@available' attribute to enclosing extension
42 |
43 | /// 判斷鏡頭的位置 (前後) => .front / .back
:
128 | /// - Parameter isEnable: Bool
129 | /// - Returns: Result<Bool, Error>
130 | func _HDR(isEnable: Bool = true) -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
131 |
132 | let result = self._lockForConfiguration { () -> Bool in
:
135 | self.isVideoHDREnabled = isEnable
136 |
137 | return self.isVideoHDREnabled
| |- error: 'isVideoHDREnabled' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
138 | }
139 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:168:28: error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
164 | /// - videoGravity: AVLayerVideoGravity => .resizeAspectFill
165 | /// - Returns: AVCaptureVideoPreviewLayer
166 | func _previewLayer(with frame: CGRect, videoGravity: AVLayerVideoGravity = .resizeAspectFill) -> AVCaptureVideoPreviewLayer {
| `- note: add '@available' attribute to enclosing instance method
167 |
168 | let previewLayer = AVCaptureVideoPreviewLayer(session: self)
| |- error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
169 |
170 | previewLayer.frame = frame
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:224:33: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
219 | /// 切換前後鏡頭 (isRunning才會換)
220 | /// - Returns: Result<Bool, Error>
221 | func _switchCamera() -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
222 |
223 | guard isRunning,
224 | let frontCamera = AVCaptureDevice._wideAngleCamera().front,
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
225 | let backCamera = AVCaptureDevice._wideAngleCamera().back
226 | else {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:225:32: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
157 |
158 | // MARK: - AVCaptureSession (class function)
159 | extension AVCaptureSession {
| `- note: add '@available' attribute to enclosing extension
160 |
161 | /// 產生、設定AVCaptureVideoPreviewLayer
:
219 | /// 切換前後鏡頭 (isRunning才會換)
220 | /// - Returns: Result<Bool, Error>
221 | func _switchCamera() -> Result<Bool, Error> {
| `- note: add '@available' attribute to enclosing instance method
222 |
223 | guard isRunning,
224 | let frontCamera = AVCaptureDevice._wideAngleCamera().front,
225 | let backCamera = AVCaptureDevice._wideAngleCamera().back
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
226 | else {
227 | return .failure(Constant.MyError.isNotRunning)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:242:24: error: cannot assign value of type 'Result<Bool, any Error>' to type 'Result<Bool, Never>'
240 | case .front:
241 | _removeInputs([_input])
242 | result = _canAddDevices(with: [backCamera]); return
| |- error: cannot assign value of type 'Result<Bool, any Error>' to type 'Result<Bool, Never>'
| `- note: arguments to generic parameter 'Failure' ('any Error' and 'Never') are expected to be equal
243 | case .back:
244 | _removeInputs([_input])
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Extension+.swift:250:16: error: cannot convert return expression of type 'Result<Bool, Never>' to return type 'Result<Bool, any Error>'
248 | }
249 |
250 | return result
| |- error: cannot convert return expression of type 'Result<Bool, Never>' to return type 'Result<Bool, any Error>'
| `- note: arguments to generic parameter 'Failure' ('Never' and 'any Error') are expected to be equal
251 | }
252 | }
SwiftCompile normal arm64 Compiling\ WWCameraPickerController.swift /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:20:34: error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
18 | public var isRunning: Bool { captureSession.isRunning }
19 |
20 | private let captureSession = AVCaptureSession()
| `- error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
21 | private let capturePhotoOutput = AVCapturePhotoOutput()
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:21:38: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
19 |
20 | private let captureSession = AVCaptureSession()
21 | private let capturePhotoOutput = AVCapturePhotoOutput()
| `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
23 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:22:42: error: 'AVCaptureMovieFileOutput' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
20 | private let captureSession = AVCaptureSession()
21 | private let capturePhotoOutput = AVCapturePhotoOutput()
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
| `- error: 'AVCaptureMovieFileOutput' is only available in tvOS 17.0 or newer
23 |
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:24:34: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
22 | private let captureMovieFileOutput = AVCaptureMovieFileOutput()
23 |
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
| `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:25:31: error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
23 |
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
| `- error: 'AVCaptureVideoPreviewLayer' is only available in tvOS 17.0 or newer
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
27 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:26:48: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
| `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
27 |
28 | private var takePhotoClosure: ((Result<AVCapturePhoto, Error>) -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:26:108: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
24 | private var defaultPosition: AVCaptureDevice.Position = .unspecified
25 | private var previewLayer: AVCaptureVideoPreviewLayer?
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
| `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
27 |
28 | private var takePhotoClosure: ((Result<AVCapturePhoto, Error>) -> Void)?
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:28:44: error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
11 |
12 | // MARK: - WWCameraViewController
13 | open class WWCameraViewController: UIViewController {
| `- note: add '@available' attribute to enclosing class
14 |
15 | @IBInspectable public var useMovieOutput: Bool = false
:
26 | private var cameraModeSetting: (flashMode: AVCaptureDevice.FlashMode, isHighResolution: Bool, quality: AVCapturePhotoOutput.QualityPrioritization) = (.auto, true, .quality)
27 |
28 | private var takePhotoClosure: ((Result<AVCapturePhoto, Error>) -> Void)?
| `- error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
29 | private var takeMovieClosure: ((Result<Bool, Error>) -> Void)?
30 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:40:39: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
36 |
37 | // MARK: - AVCapturePhotoCaptureDelegate
38 | extension WWCameraViewController: AVCapturePhotoCaptureDelegate {
| `- note: add '@available' attribute to enclosing extension
39 |
40 | public func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
41 | if let error = error { takePhotoClosure?(.failure(error)); return }
42 | takePhotoClosure?(.success(photo))
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:40:93: error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
36 |
37 | // MARK: - AVCapturePhotoCaptureDelegate
38 | extension WWCameraViewController: AVCapturePhotoCaptureDelegate {
| `- note: add '@available' attribute to enclosing extension
39 |
40 | public func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
| | `- error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
41 | if let error = error { takePhotoClosure?(.failure(error)); return }
42 | takePhotoClosure?(.success(photo))
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:49:38: error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
45 |
46 | // MARK: - AVCaptureFileOutputRecordingDelegate
47 | extension WWCameraViewController: AVCaptureFileOutputRecordingDelegate {
| `- note: add '@available' attribute to enclosing extension
48 |
49 | public func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
50 | fileOutputAction(output, didFinishRecordingTo: outputFileURL, from: connections, error: error)
51 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:49:119: error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
45 |
46 | // MARK: - AVCaptureFileOutputRecordingDelegate
47 | extension WWCameraViewController: AVCaptureFileOutputRecordingDelegate {
| `- note: add '@available' attribute to enclosing extension
48 |
49 | public func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
50 | fileOutputAction(output, didFinishRecordingTo: outputFileURL, from: connections, error: error)
51 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:90:49: error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
88 | /// 取得拍攝相片的相關資訊
89 | /// - Parameter photo: Result<AVCapturePhoto, Error>
90 | func takePhoto(_ result: @escaping ((Result<AVCapturePhoto, Error>) -> Void)) { takePhotoClosure = result }
| | `- error: 'AVCapturePhoto' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
91 |
92 | /// 取得錄影的相關資訊
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:114:49: error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
112 | /// - sessionPreset: [AVCaptureSession.Preset - 4:3 (.photo) / 16:9 (.high)](https://www.jianshu.com/p/9e1661805d74)
113 | /// - videoGravity: [AVLayerVideoGravity - 滿版 (.resizeAspectFill) / 比例 (.resizeAspect)]
114 | func previewLayerRateSetting(sessionPreset: AVCaptureSession.Preset = .photo, videoGravity: AVLayerVideoGravity = .resizeAspect) {
| | `- error: 'AVCaptureSession' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
115 | captureSession.sessionPreset = sessionPreset
116 | previewLayer?.videoGravity = videoGravity
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:114:76: error: 'photo' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
112 | /// - sessionPreset: [AVCaptureSession.Preset - 4:3 (.photo) / 16:9 (.high)](https://www.jianshu.com/p/9e1661805d74)
113 | /// - videoGravity: [AVLayerVideoGravity - 滿版 (.resizeAspectFill) / 比例 (.resizeAspect)]
114 | func previewLayerRateSetting(sessionPreset: AVCaptureSession.Preset = .photo, videoGravity: AVLayerVideoGravity = .resizeAspect) {
| | `- error: 'photo' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
115 | captureSession.sessionPreset = sessionPreset
116 | previewLayer?.videoGravity = videoGravity
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:149:27: error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
147 | /// - animated: Bool
148 | /// - completion: (() -> Void)?
149 | func album(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, animated: Bool = true, completion: (() -> Void)? = nil) {
| `- error: 'UIImagePickerControllerDelegate' is unavailable in tvOS
150 | let imagePickerController = UIImagePickerController._photoLibrary(delegate: delegate)
151 | self.present(imagePickerController, animated: animated) { completion?() }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:113:11: note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
111 |
112 | API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
113 | @protocol UIImagePickerControllerDelegate<NSObject>
| `- note: 'UIImagePickerControllerDelegate' has been explicitly marked unavailable here
114 | @optional
115 | // The picker does not dismiss itself; the client dismisses it in these callbacks.
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:160:45: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
154 |
155 | // MARK: - 開放使用的函數 (設定)
156 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 設定一開始的鏡頭位置 (設定一開始起動的鏡頭位置)
159 | /// - Parameter defaultPosition: AVCaptureDevice.Position
160 | func defaultPosition(_ defaultPosition: AVCaptureDevice.Position) {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
161 | self.defaultPosition = defaultPosition
162 | }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:166:40: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
154 |
155 | // MARK: - 開放使用的函數 (設定)
156 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 設定一開始的鏡頭位置 (設定一開始起動的鏡頭位置)
:
164 | /// 設定閃光燈模式
165 | /// - Parameter flashMode: AVCaptureDevice.FlashMode
166 | func flashModeSetting(_ flashMode: AVCaptureDevice.FlashMode = .auto) { cameraModeSetting.flashMode = flashMode }
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
167 |
168 | /// 設定使用高解析度模式
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:174:36: error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
154 |
155 | // MARK: - 開放使用的函數 (設定)
156 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
157 |
158 | /// 設定一開始的鏡頭位置 (設定一開始起動的鏡頭位置)
:
172 | /// 設定拍照品質
173 | /// - Parameter quality: AVCapturePhotoOutput.QualityPrioritization
174 | func qualitySetting(_ quality: AVCapturePhotoOutput.QualityPrioritization = .quality) { cameraModeSetting.quality = quality }
| | `- error: 'AVCapturePhotoOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
175 | }
176 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:189:33: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
187 | /// - Parameter position: AVCaptureDevice.Position
188 | /// - Returns: Bool
189 | func photoSetting(position: AVCaptureDevice.Position) -> Bool {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
190 |
191 | guard let device = defaultCamera(position: position),
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:209:34: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:209:78: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:250:37: error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
248 | /// - connections: [AVCaptureConnection]
249 | /// - error: Error?
250 | func fileOutputAction(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureFileOutput' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
251 |
252 | if let error = error { self.takeMovieClosure?(.failure(error)) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:250:118: error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
248 | /// - connections: [AVCaptureConnection]
249 | /// - error: Error?
250 | func fileOutputAction(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
| | `- error: 'AVCaptureConnection' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing instance method
251 |
252 | if let error = error { self.takeMovieClosure?(.failure(error)) }
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:121:66: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
119 | /// 取得鏡頭的縮放範圍
120 | /// - Returns: Constant.CameraZoomRange?
121 | func cameraZoomRange() -> Constant.CameraZoomRange? { return AVCaptureDevice._default(for: .video)?._zoomRange() }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
122 |
123 | /// 鏡頭縮放 (沒有動態)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:128:95: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
126 | /// - factor: 比率因子
127 | /// - Returns: Result<CGFloat?, Error>?
128 | func cameraZoom(with rate: CGFloat, factor: CGFloat) -> Result<CGFloat?, Error>? { return AVCaptureDevice._default(for: .video)?._zoom(with: rate, factor: factor) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
129 |
130 | /// 鏡頭放大 (有動態)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:133:80: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
131 | /// - Parameter rate: 比率
132 | /// - Returns: Result<CGFloat?, Error>?
133 | func cameraZoomIn(with rate: CGFloat) -> Result<CGFloat?, Error>? { return AVCaptureDevice._default(for: .video)?._zoomIn(with: rate) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
134 |
135 | /// 鏡頭縮小 (有動態)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:138:81: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
136 | /// - Parameter rate: 比率
137 | /// - Returns: Result<CGFloat?, Error>?
138 | func cameraZoomOut(with rate: CGFloat) -> Result<CGFloat?, Error>? { return AVCaptureDevice._default(for: .video)?._zoomOut(with: rate) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
139 |
140 | /// [啟動HDR - High Dynamic Range Imaging](https://zh.wikipedia.org/zh-tw/高动态范围成像)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:143:69: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
53 |
54 | // MARK: - 開放使用的函數 (動作)
55 | public extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
56 |
57 | /// 啟動相機預覽
:
141 | /// - Parameter isEnable: Bool
142 | /// - Returns: Result<Bool, Error>
143 | func cameraHDR(isEnable: Bool) -> Result<Bool, Error>? { return AVCaptureDevice._default(for: .video)?._HDR(isEnable: isEnable) }
| | |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| | `- note: add 'if #available' version check
| `- note: add '@available' attribute to enclosing instance method
144 |
145 | /// 產生相簿ViewController
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:150:37: error: 'UIImagePickerController' is unavailable in tvOS
148 | /// - completion: (() -> Void)?
149 | func album(delegate: (UIImagePickerControllerDelegate & UINavigationControllerDelegate)? = nil, animated: Bool = true, completion: (() -> Void)? = nil) {
150 | let imagePickerController = UIImagePickerController._photoLibrary(delegate: delegate)
| `- error: 'UIImagePickerController' is unavailable in tvOS
151 | self.present(imagePickerController, animated: animated) { completion?() }
152 | }
/Applications/Xcode-27.0.0-Release.Candidate.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS27.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIImagePickerController.h:69:12: note: 'UIImagePickerController' has been explicitly marked unavailable here
67 |
68 | UIKIT_EXTERN API_AVAILABLE(ios(2.0)) API_UNAVAILABLE(tvos, watchos) NS_SWIFT_UI_ACTOR
69 | @interface UIImagePickerController : UINavigationController <NSCoding>
| `- note: 'UIImagePickerController' has been explicitly marked unavailable here
70 |
71 | + (BOOL)isSourceTypeAvailable:(UIImagePickerControllerSourceType)sourceType; // returns YES if source is available (i.e. camera present)
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:211:29: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
212 | let wideAngleDevices = AVCaptureDevice._wideAngleCamera()
213 |
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:212:32: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
176 |
177 | // MARK: - 小工具
178 | private extension WWCameraViewController {
| `- note: add '@available' attribute to enclosing extension
179 |
180 | /// 初始化設定
:
207 | /// - Parameter position: AVCaptureDevice.Position
208 | /// - Returns: AVCaptureDevice?
209 | func defaultCamera(position: AVCaptureDevice.Position = .unspecified) -> AVCaptureDevice? {
| `- note: add '@available' attribute to enclosing instance method
210 |
211 | let defaultDevice = AVCaptureDevice._default(for: .video)
212 | let wideAngleDevices = AVCaptureDevice._wideAngleCamera()
| |- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add 'if #available' version check
213 |
214 | switch position {
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift:214:9: warning: switch covers known cases, but 'AVCaptureDevice.Position' may have additional unknown values, possibly added in future versions; this is an error in the Swift 6 language mode
212 | let wideAngleDevices = AVCaptureDevice._wideAngleCamera()
213 |
214 | switch position {
| |- warning: switch covers known cases, but 'AVCaptureDevice.Position' may have additional unknown values, possibly added in future versions; this is an error in the Swift 6 language mode
| `- note: handle unknown values using "@unknown default"
215 | case .front: return wideAngleDevices.front
216 | case .back: return wideAngleDevices.back
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/WWCameraPickerController.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile WWCameraPickerController.swift
SwiftCompile normal arm64 Compiling\ resource_bundle_accessor.swift /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources/resource_bundle_accessor.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/WWCameraPickerController.build/Debug-appletvos/WWCameraPickerController-t.build/DerivedSources/resource_bundle_accessor.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile resource_bundle_accessor.swift
SwiftCompile normal arm64 Compiling\ Constant.swift /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Constant.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
/Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Constant.swift:18:41: error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
14 |
15 | // MARK: - typealias
16 | extension Constant {
| `- note: add '@available' attribute to enclosing extension
17 | typealias ScreenBoundsInfomation = (width: CGFloat, height: CGFloat, scale: CGFloat) // iPhone的裝置螢幕大小 (寬/高/比例)
18 | typealias WideAngleCamera = (front: AVCaptureDevice?, back: AVCaptureDevice?) // 前後鏡頭
| | `- error: 'AVCaptureDevice' is only available in tvOS 17.0 or newer
| `- note: add '@available' attribute to enclosing type alias
19 | }
20 |
SwiftCompile normal arm64 /Users/admin/builder/spi-builder-workspace/Sources/WWCameraPickerController/Constant.swift (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
cd /Users/admin/builder/spi-builder-workspace/.swiftpm/xcode
builtin-SwiftPerFileCompile Constant.swift
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/ExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules
PruneExplicitPrecompiledModules /Users/admin/builder/spi-builder-workspace/.derivedData/SDKExplicitPrecompiledModules
2026-09-20 22:45:33.537 xcodebuild[819:4873] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
** BUILD FAILED **
The following build commands failed:
SwiftCompile normal arm64 (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
SwiftEmitModule normal arm64 Emitting\ module\ for\ WWCameraPickerController (in target 'WWCameraPickerController' from project 'WWCameraPickerController')
Building workspace WWCameraPickerController with scheme WWCameraPickerController
(3 failures)
BUILD FAILURE 6.4 tvOS