- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.2k
fix(ios): fixed TabBarItem's badge update for iOS 18+ #14324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Tested it on iPhone and iPad and both badges are set correctly now 👍 | 
| @m1ga Thanks for testing and reporting 👍 | 
| @m1ga The new issue could be reproduced by modifying your example from #14145 (comment) as follows which initially leads to  But iOS 18 has a modified caching mechanism for the tab bar, which leads to these strange problems... Using an "empty" placeholder image at creation time has solved this problem. | 





Fixes #14145.
Introduction:
updateTabBarItema newUITabBarItemis created and assigned to the ViewController with each property updateUITabBarItemto update the badge valueDescription:
rootController.tabBarItemwhen updating the properties, e.g. badge value, of a tab bar item inupdateTabBarItemimage == nil(lazy loading) an "empty" placeholder image is used now (1x1 px transparent)Inconsistency in UITabBar items and view controllers detected.