Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Targeting iOS 11.0 but still getting warnings: is only available on iOS 10.0 or newer

Tags:

xcode

ios

I have both project and target deployment target set to 11.0. I've also deleted derived data, cleaned and rebuilt (many times)... and I am still getting these errors. Is there something else I could be missing? I did change the deployment target from 9.x to 11.0. Maybe I missed something.

AVCapturePhotoOutput' is only available on iOS 10.0 or newer AVCaptureResolvedPhotoSettings' is only available on iOS 10.0 or newer AVCaptureDeviceTypeBuiltInWideAngleCamera' is only available on iOS 10.0 or newer

and several others

like image 506
LittlePeculiar Avatar asked Apr 27 '18 19:04

LittlePeculiar


1 Answers

If you are using CocoaPods this could be due to that setting wrong targets for the libraries it links. It's a known CocaPods issue.

Until the issue if fixed, I am using this temporary "fix" that has removed 103 warnings from my project. You can place this at the bottom of your Podfile:

# temporary fix for this issue to suppress a ton of warnings
# https://github.com/CocoaPods/CocoaPods/issues/7314
post_install do |pi|
    pi.pods_project.targets.each do |t|
        t.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
        end
    end
end
like image 115
Dimitris Avatar answered Oct 28 '22 19:10

Dimitris