Issue
Certain Swift commands during a test run hangs a build because it initiates a pop-up, asking for permission to paste something. For example:
UIPasteboard.general.string = "Hello world"
Possible solutions
Use the UIPasteControl class introduced with iOS 16 to paste without a user prompt.