I‘ve literally been working in this issue the last two days.
It appears for the prompt to appear in iOS 18 you need to have the NSLocalNetworkUsageDescription set in your info.plist with a message. Other iOS versions don't seem to care. Hope this helps!