iOS 15 Xcode 13 Console Log for UIBarButton Item with Menu

I am seeing a console log in xCode 13 "Disabling recursion trigger logging" every time a BarButtonItem is tapped in iOS 15 configured with UIBarButtonItem(title: nil, image: UIImage(systemName: "ellipsis"), primaryAction: nil, menu: items)

Normally I would not be concerned but the app sometimes hangs with cpu at 100% and memory utilisation keeps increasing?

I see the same message when calling the reloadData UICollectionView method.

Sometimes the app doesn't reload cells, func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell  is not called, contentSize in that case is incorrect and equal to the sum of estimatedItemSize. As result UICollectionView is empty. Strange that it reproduces only from time to time.

Before xCode 13 and iOS 15 I haven't seen such issues.

Could you show more code, notably how is menus defined. There is a recursive call somewhere, we need to see the complete code to try and find why.

Could this be helpful ?

https://stackoverflow.com/questions/37800790/hide-strange-unwanted-xcode-logs

Claude Here is the code fragment that defines the menu;

` if #available (macCatalyst 14 , iOS 14,  *) {        

            let items = UIMenu(title: "", options: .displayInline, children: [

                UIAction(title: helpString, image: UIImage(systemName: "questionmark.circle"), handler: { _ in

                    guard let url = URL(string: "https://springnotes.app/help/") else {

                        return

                    }

                    if UIApplication.shared.canOpenURL(url) {

                        UIApplication.shared.open(url, options: [:], completionHandler: nil)

                    }

                }),

                UIAction(title: outlineString, image: UIImage(systemName: "circle.grid.2x2"), handler: {[unowned self]  _ in self.navigatePopUp(sender: moreButton) }),

                UIAction(title: settingsString, image: UIImage(systemName: "slider.horizontal.3"), handler: {[unowned self]  _ in self.settingsPopUp(sender: moreButton) })

            ]) `

iOS 15 Xcode 13 Console Log for UIBarButton Item with Menu
 
 
Q