BLACK FRIDAY: Save 50% on all my Swift books and bundles! >>

Disabling recursion trigger logging

Forums > iOS

Does anyone know what this message means:

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

3      

Can you post your ViewController code?

3      

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
        print("trial")
    }

    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

3      

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.

3      

Save 50% in my WWDC sale.

SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

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.