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...

  • 14
    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, 2020 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. Jul 1, 2020 at 14:37
  • 2
    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.
    – user7014451
    Jul 2, 2020 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".
    – user7014451
    Jul 2, 2020 at 15:10
  • 2
    @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 3, 2020 at 14:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.