updateVisibleMenu not working for UIMenu / contextMenuInteraction?

Hi folks,

I'm working on a project where I am updating the UIMenu I have configured from a button's menu with showsMenuAsPrimaryAction. However, the updateVisibleMenu API doesn't seem to actually update the visible menu as it should. Does anyone know of a workaround or existing radar issue surrounding this API?

I ran Apple's demo code of UpdateMenuViewController that should showcase this feature and that also does not appear to work! Nothing in the displayed menu changes when their timer hits and the visible menu stays the same. They configure their menu differently, but irregardless of this, neither work with this API.

When I debug the menu, in one call I get through and return the menu with updated state/attributes for the elements, but nothing has changed in it. When I break into it a second time while it's still visible the menu I receive is still the original one before the first update that I made changes to.

Unclear why it wouldn't be working, but if your update really is to just show the menu that you wish to apply to the UIButton you don't need to call updateVisibleMenu – just setting a new menu will cause UIButton to do that for you on your behalf and is recommended for these kinds of cases.

updateVisibleMenu not working for UIMenu / contextMenuInteraction?
 
 
Q