App crashes when setup UITabBarController only on ipad ios 17

I am trying to setup UITabBarController, it works fine on iphone but crashes on ipad ios 17

the iphone have the save ios version as the ipad

I use xcode version 15.4

This is my tabbar controller

class DashboardVC: UITabBarController, UITabBarControllerDelegate {
    var presenter: DashboardPresentation?
    var controllersList: [UIViewController]?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.navigationController?.navigationBar.isHidden = true
       // self.navigationItem.title = "Check Me".localized()
        self.delegate = self
        self.tabBar.shadowImage = nil
        
        self.tabBar.layer.borderWidth = 1
        self.tabBar.layer.borderColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)
        self.tabBar.clipsToBounds = true
        setubTabControllers()
    }
    
    func setubTabControllers() {
        self.tabBar.tintColor = #colorLiteral(red: 0.05490196078, green: 0.3764705882, blue: 0.8980392157, alpha: 1)
        self.tabBar.barTintColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
        self.tabBar.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
        self.tabBar.unselectedItemTintColor =  #colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1)
        self.tabBar.isTranslucent = false
        self.tabBar.itemPositioning = .centered
        
        let homeVC = HomeRouter.assembleModule(title: msgTitle, message: message, goToChat: goToChat, returnNav: true)

        homeVC.tabBarItem = UITabBarItem(title: "Home".localized(), image: UIImage(named: "Home-inactive")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "Home")?.withRenderingMode(.alwaysOriginal))
        
        let favVC = NotificationsListRouter.assembleModule(dashboardDelegate: self, returnNav: true)
        favVC.tabBarItem = UITabBarItem(title: "Notifications".localized(), image: UIImage(named: "Notifications-inactive")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "Notifications-active")?.withRenderingMode(.alwaysOriginal))
        
        let searchVC = ResultsRouter.assembleModule(returnNav: true)
        searchVC.tabBarItem = UITabBarItem(title: "Results".localized(), image: UIImage(named: "result-inactive")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "result-active")?.withRenderingMode(.alwaysOriginal))

        let accountVC = AccountRouter.assembleModule(returnNav: true)
        accountVC.tabBarItem = UITabBarItem(title: "Profile".localized(), image: UIImage(named: "profile-inactive")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "profile-active")?.withRenderingMode(.alwaysOriginal))
        
        if UIDevice.current.userInterfaceIdiom == .pad {
            homeVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20)], for: .normal)
            favVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20)], for: .normal)
            searchVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20)], for: .normal)
            accountVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.systemFont(ofSize: 20)], for: .normal)
        } else {
            homeVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 15)], for: .normal)
            favVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 15)], for: .normal)
            searchVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 15)], for: .normal)
            accountVC.tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 15)], for: .normal)
        }
        
        controllersList = [homeVC, favVC, searchVC, accountVC]
        self.viewControllers = controllersList
    }
    
    func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
    }
}

this is the error when the app crashed

*** Assertion failure in UITraitCollection * _Nonnull _UIGetCurrentFallbackTraitCollection(void)(), _UIFallbackEnvironment_NonARC.m:117
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'A trait environment returned a trait collection with unspecified values for traits that are not allowed to be unspecified. This is a serious application bug and will cause undefined behavior. This issue may be caused by your class overriding the traitCollection property getter, which is not supported. Make sure to use the appropriate API if you are trying to override traits. Trait Environment: <UITabBarSwappableImageView: 0x105b2bf90; frame = (0 0; 0 0); opaque = NO; userInteractionEnabled = NO; image = <UIImage:0x6000030058c0 CGImage anonymous; (23 23)@2>; layer = <CALayer: 0x600000293bc0>>; Trait Collection: <UITraitCollection: 0x105a54950; HorizontalSizeClass = Compact, PreferredContentSizeCategory = L>'

I tried to debug the code to detect why this happens only on ipad but found nothing

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật