Tab Bar Appearances before iOS 13

I have upgraded to Xcode 13, and I'm now getting the error "Tab Bar Appearances before iOS 13". When I click on the error it leads me to a tab bar in a Storyboard without providing additional information.

What could be causing this error?

That's the error:

These are the tab bar details:

Answered by mdacne in 715116022

I fixed it by deleting the existing Tab Bar from the Storyboard and creating a new one.

A possible cause:

  • do you use tabBarAppearance in code ?
  • if so, check your deployment target and deployment info. If it is lower than 13.0, that's the cause.
  • Then, enclose the call to appearance with
if #available(iOS 13.0, *) {
        // use appearance
} else {
       // configure directly
}
Accepted Answer

I fixed it by deleting the existing Tab Bar from the Storyboard and creating a new one.

You can go to the Inspectors -> Interface Builder Document -> Builds for -> Select iOS 13.0 and Later , to fix this issue.

Just open the Storyboard as XML and delete the tabBarAppearance element if it is standard with no child elements and you're targeting iOS < 13:

&lt;tabBarAppearance key="standardAppearance"&#x2F;>
Tab Bar Appearances before iOS 13
 
 
Q