I see that there is a known issue about URL.host(percentEncoded:) to raise an EXC_BREAKPOINT crash on iOS 16.
I used Url.query(percentEncoded:) and it triggered a crash on iOS 16 but the exception is shown at Url.host() instead of Url.query(). So, is there a chance that Url.query() calls Url.host() under the hood?
I was able to resolve the crash by replacing Url.query(percentEncoded:) with the older API Url.query, but I don't understand that why would accessing the query would also access the host?
Here is the code snippet: (The crash is triggered on iOS 16)
let urlWithNoQuery = URL(string: "https://www.apple.com/")!
_ = urlWithNoQuery.query(percentEncoded: true)
I have created a single view app with only these two lines of code. As you can see that I have called URL.query(percentEncoded:), while the app crashes at Url.host(percentEncoded:). Why does accessing the query crashes on accessing the host, when I am not even using Url.host(percentEncoded:). anywhere.
Here is a simple View Controller for reference.

