UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Disabling recursion trigger logging

Forums > iOS

Does anyone know what this message means:

[UICollectionViewRecursion] cv == 0x7fe385815e00 Disabling recursion trigger logging


Can you post your ViewController code?


I am also facing this issue. while I tried to add UIMenu in my UI. Here is the code:

    let action = UIAction(title: "Majha"){ action in

    let menu = UIMenu(
        image: nil,
        identifier: UIMenu.Identifier("First"),
        options: .displayInline,
        children: [action]

    let trial = UIBarButtonItem(title: "BarButton", image: nil, primaryAction: nil, menu: menu)

    self.navigationItem.leftBarButtonItem = trial


I've spend some time answering this on Stackoverflow directly, you can go check my answer: https://stackoverflow.com/questions/69397650/swiftui-disabling-recursion-trigger-logging-when-use-menu/70102618#70102618

Someone there shared a tweet from the developer that seems involved: https://twitter.com/caughtinflux/status/1439276097464528896?s=21

So it's definately not your fault, for disabling this message for convenience you can check my solution.

As @Minho shared it's seems to be a simple debug / diagnostic left by a dev.

Fortunately for us they used Os.Log which we should all use, correctly like it is done here.

Using the console we can identify the subsystem and category of the messages

console.app logs of related error

We can then tell Os.Log to ignore the related subsystem and Category With subsystem: com.apple.UIKit and category: UICollectionViewRecursion

This give us the following commands, the first for system (device), the second for the booted simulator.

// Disable forgotten 'UICollectionViewRecursion' debug messages, see.
// https://stackoverflow.com/questions/69397650/swiftui-disabling-recursion-trigger-logging-when-use-menu
// https://twitter.com/caughtinflux/status/1439276097464528896?s=21
sudo log config --mode "level:off" --subsystem com.apple.UIKit --category UICollectionViewRecursion
xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.UIKit --category UICollectionViewRecursion

Hope this helps and again please use Os.Log in your projects.


Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.