iOS changes keyboard background to blue (iOS13+)

Viewed 92

Beginning with iOS 13 and including iOS 14, our old legacy app somehow broke:

keyboard bug

The default iOS keyboard is completely blue - If fixes itself if you press shift, but it re-appears if you open the keyboard again. This happens with UISearchBar and UITextField.

This is a native iOS app without any UI Frameworks or any other shenaningans. It is a legacy application, still using Storyboard and built a long time ago.

What I've tried:

  • Simply building the app using the newest SDK
  • Playing around with tint colors e.g. [[UINavigationBar appearance] setTintColor]
  • Appearance settings, theme settings etc. e.g. [[UITextField appearance] setTintColor], [[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceLight]
  • Locking the theme to light setOverrideUserInterfaceStyle: UIUserInterfaceStyleLight
  • Setting the Keyboard Look to "Light" in the Storyboard Properties of the UISearchBar / UITextField

Nothing seems to make any difference. I know that this is the blue default color of iOS, so this must be set SOMEWHERE and causing this.

Does anyone have an idea what causes this and how to fix this issue?

The issue is visible in the Simulator as well as on devices. It appears to break beginning of iOS 14, and stays broken using the freshest iOS 15.

2 Answers

So, after true desperation kicked in, I did what every sensible programmer does: I blamed everyone else. I started to remove stale/old dependencies that were not strictly needed, and managed to find the culprit:

  • It was the Sentry SDK that caused this issue, which somewhat makes sense as they probably hook in deep to collect additional data for error logging

After removal of the SDK, the issue was resolved.

  • Check all your Appearance changes in the latest development.
  • Check if you have added any New Third-party library to manage the keyboard appearance over TextField.
  • Try commenting out the above changes and also if any tint colors you apply to views. This might solve your problem.
Related