I am using v 4.3.1
Upon updating Xcode to 12, I cannot build my app!
This error occurs in ThumbSelectorView.swift Line 141
Cannot convert value of type 'CMTime' to type 'NSValue' in coercion

I'm getting the same problem...when I fixed this I got a lot of other build errors for YPImagePicker:
e.g.
/Pods/YPImagePicker/Source/Pages/Photo/PostiOS10PhotoCapture.swift:53:36: Value of type 'AVCapturePhotoOutput' has no member 'supportedFlashModes'
/Pods/YPImagePicker/Source/Pages/Photo/PostiOS10PhotoCapture.swift:53:66: Cannot infer contextual base in reference to member 'auto'
@grantespo
Modify [time as NSValue] to [NSValue(time: time)]
generator?.generateCGImagesAsynchronously(forTimes: [NSValue(time: time)],
@timothyerwin
Occurs only in the simulator.
settings.flashMode = .off
if let deviceInput = deviceInput {
if deviceInput.device.isFlashAvailable {
switch currentFlashMode {
case .auto:
if photoOutput.supportedFlashModes.contains(.auto) {
settings.flashMode = .auto
}
case .off:
if photoOutput.supportedFlashModes.contains(.off) {
settings.flashMode = .off
}
case .on:
if photoOutput.supportedFlashModes.contains(.on) {
settings.flashMode = .on
}
}
}
}
its work for me.
@colbylim thanks that worked,
but to fixup timothy's issue, I just removed the flash code altogether since i am only using the image picker.
if use cocoapods, you can add this line to your podfile:
pod 'PryntTrimmerView', :git => 'https://github.com/HHK1/PryntTrimmerView.git'
please see the pull request: https://github.com/Yummypets/YPImagePicker/pull/565
nope, change pod code is not good solution
Most helpful comment
@grantespo
Modify [time as NSValue] to [NSValue(time: time)]
generator?.generateCGImagesAsynchronously(forTimes: [NSValue(time: time)],
@timothyerwin
Occurs only in the simulator.
if arch(i386) || arch(x86_64)
settings.flashMode = .off
else
if let deviceInput = deviceInput {
if deviceInput.device.isFlashAvailable {
switch currentFlashMode {
case .auto:
if photoOutput.supportedFlashModes.contains(.auto) {
settings.flashMode = .auto
}
case .off:
if photoOutput.supportedFlashModes.contains(.off) {
settings.flashMode = .off
}
case .on:
if photoOutput.supportedFlashModes.contains(.on) {
settings.flashMode = .on
}
}
}
}
endif
its work for me.