Search code examples
swiftxcodeios14

Xcode warning "SF Symbol is unavailable prior to iOS 14"


I see multiple warning in my Xcode project about adding fallback images for older iOS version which do not support SF Symbols, but my deployment target is set to iOS 14. I don't want to support older versions. How can I turn off these warning?

Asset Unavailable

SF Symbol 'trash' is unavailable prior to iOS 13.0. Add a fallback image of the same name to the asset catalog for backward deployment.

enter image description here enter image description here enter image description here


Solution

  • Yes, not just Project, but every target (even Pods) has its own deployment target. So my favorite method of checking that deployment target is consistent across all places is running the following command from your project root directory:

    grep IPHONEOS_DEPLOYMENT_TARGET -R ./*
    

    What you should see something like (giving an example of my project, which is set to 11.0):

    ./Pods/Pods.xcodeproj/project.pbxproj:  IPHONEOS_DEPLOYMENT_TARGET = 11.0;
    ...
    ./MyProject.xcodeproj/project.pbxproj:  IPHONEOS_DEPLOYMENT_TARGET = 11.0;
    ...
    

    Also specifically for storyboards you may want to check that the following setting is correct (in File Inspector of the storyboard):

    enter image description here

    I personally never seen it being incorrect, but since all your warnings are coming from storyboard, it could be the case.