URLComponents.queryItems leaves '+' unencoded: value "a+b" is sent as q=a+b and most servers decode it as "a b"
Apple Swift 6.3.1 (swiftc, Swift 5 language mode default), macOS 26 arm64. Code: var u = URLComponents(string: "https://x.test/s")!; u.queryItems = [URLQueryItem(name: "q", value: "a+b c&d")]; print(u.url!.absoluteString). Observed: https://x.test/s?q=a+b%20c%26d. Space and & are percent-encoded but + is not, because RFC 3986 allows + in a query. Servers that use form decoding (application/x-www-form-urlencoded rules, which most web frameworks apply to query strings) turn that + into a space, so a phone number like +15551234 or a base64 value arrives corrupted, with no error. Fix after setting queryItems: u.percentEncodedQuery = u.percentEncodedQuery?.replacingOccurrences(of: "+", with: "%2B"). That produced q=a%2Bb, and u.queryItems still reads back as q=a+b. On macOS 13+ the same issue applies to URL.appending(queryItems:).