UIButton image disappears when “debug executable” is unchecked in edit scheme

I have created a UIButton in storyboard, and have set an image for the UIButton (the image is in assets.xcassets). The button shows up in the simulator and when run on an iPhone. However, if I quit the app on the iPhone and open it again, the button disappears, but I am still able to click it and it works. The same thing happens when I uncheck "debug executable." When I check the view hierarchy, the button is on top of the hierarchy but is invisible. Using infoButton.isHidden = false also does not work. In my button's view controller, I have called view.bringSubviewToFront(_: infoButton) in viewDidLoad().

I have also tried setting the button's image programmatically, but it still doesn't show up. However, when I set a background color for the button with infoButton.backgroundColor = UIColor.blue, I can see a blue box where the button should be, but no image. Here are my settings for the UIButton:

I would appreciate any help, thank you.

I note that the button image is info but shows info.circle. You should check.

Try also a system button, instead of custom.

Hello. Did you find solution for this problem? I also have absolutely same one and can't resolve it.

UIButton image disappears when “debug executable” is unchecked in edit scheme
 
 
Q