I’d argue that if you pass the ‘no UI’ flag to a routine and it displays UI anyway, that’s a bug. Please file it as such, then post your bug number, just for the record.
Keep in mind that the fix for a bug like this is that the routine will fail rather than present a UI. That seems like it’s not what you’re looking for.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"