LittlePeculiar
LittlePeculiar

Reputation: 403

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

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

Upvotes: 11

Views: 4232

Answers (1)

Dimitris
Dimitris

Reputation: 13670

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

Upvotes: 14

Related Questions