DNSClient
DNSClient copied to clipboard
Not Able To Read /etc/resolv.conf on iOS 18
Test Environment
OS: iOS 18.0.1 Device: iPhone 15 Pro
Related Code
DNSClient+Connect.swift line 236
let configString = try String(contentsOfFile: "/etc/resolv.conf")
Error
Error Domain=NSCocoaErrorDomain Code=260 "The file “resolv.conf” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/etc/resolv.conf, NSURL=file:///etc/resolv.conf, NSUnderlyingError=0x3016ac180 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}