53

Using Xcode 12 beta (12A6159) on macOS Catalina 10.15.5 (19F101) when I press "Back" button in NavigationView, navigating back from a pushed View, I see this warning in the console.

[UIContextMenuInteraction] Attempting -[UIContextMenuInteraction dismissMenu], when not in an active state. This is a client error most often caused by calling dismiss more than once during a given lifecycle. (<_UIVariableGestureContextMenuInteraction: 0x6000037689a0>)

I did not get this warning on Xcode 11.5.

The code is dead simple:

var body: some View {
    NavigationView {
        NavigationLink(destination: gameScreen) {
            Text("Start game")
        }
    }
}

After having navigated to gameScreen and then pressing the "Back" button in the NavigationBar I see the logged warning in the console.

I have not upgraded to any of the new SwiftUI stuff like App or SceneBuilder etc...

Sajjon
  • 8,938
  • 5
  • 60
  • 94
  • 15
    Just because something is in beta doesn't mean one - at least not me and 2 others - are curious as to why I get this message. Might be an indicator that I ought to change the code somehow – Sajjon Jun 23 '20 at 14:00
  • When running under Xcode 12 beta, but using iPhone SE - 2nd gen - 13.5 simulator - the error does not show up and code works as expected. So, it looks to be a bug in iOS 14 or the simulator. – Theo Carper Jul 01 '20 at 14:37
  • 3
    1/ FYI, this isn't *just* a SwiftUI warning - my UIKit console shows the exact same thing. Running Xcode 12, iPadOS 14 (actual device), using a UIButton menu. Only happens when I try displaying a `PHPicker` from via a `UIAction` - and it executes properly. –  Jul 02 '20 at 15:07
  • 1
    2/ I don't know if you actively participated in the beat cycle last year, but (1) they tend to release new betas every 2 weeks, (2) these sort of messages come and go - yes, that means you'll see new ones appear in beta 2 - and (3) last year they basically broke most everything with SwiftUI in beta 4. Very painful! Most of all? Remember this is beta 1 - if you see this come... beta 4? Maybe then you'll be able to seek a better explanation beyond "it's a beta". –  Jul 02 '20 at 15:10
  • 3
    @Sajjon Thanks for reporting. I was freaking out that it's a problem in my app. I have filed an issue with Apple. – VoodooBoot Jul 03 '20 at 14:42
  • I'm using App in Beta 12 and I'm seeing it too. – J. Edgell Jul 13 '20 at 18:04
  • I'm seeing one too. I have a custom button inside a NavigationLink – Joseph Francis Jul 28 '20 at 17:31
  • Got it too... Beta 12 – Kai Zheng Sep 01 '20 at 06:33
  • This still exists in 14.5 – Ryan May 30 '21 at 01:24
  • @Sajjon I think this is related to the gameScreen. I think you are using UIContextMenu there. If you can tell us more we can help. – pushpank Jun 15 '21 at 15:11

0 Answers0