Default URLSession TLS Validation vs. Custom Delegate for Self‑Signed Certificates
Goal: Allow an iOS/macOS app to connect to a backend that uses a self‑signed TLS certificate while ensuring that hostname verification remains intact and the connection is not vulnerable to man‑in‑the‑middle attacks. Constraint: URLSession’s built‑in validation rejects self‑signed certificates unless the app provides a delegate that evaluates the server’s Se