Post

Replies

Boosts

Views

Activity

Reply to DNSProxyProvider not running
Thanks for replying. No, I don't see any crash reports related to this in Console. FYI, I am running the app in debug mode, and SIP is enabled. When I run this command, systemextensionsctl list, I can see another app using the network extension ( network extension [activated enabled]). Is the another app causing this error?
Oct ’22
Reply to DNSProxyProvider not running
Update: I added OsSystemExtensionRequest. But I'm getting this error The operation couldn’t be completed. (OSSystemExtensionErrorDomain error 1.)   let log = OSLog(subsystem: "com.example.apple-samplecode.DNSTestBed", category: "app") //  let manager = NEDNSProxyManager()   var manager: NEDNSProxyManager?   private func installSystemExtension() {    os_log("DNSFProxy: installing system extension")    let request = OSSystemExtensionRequest.activationRequest(     forExtensionWithIdentifier: "bundle identifier",     queue: .main    )    request.delegate = self    OSSystemExtensionManager.shared.submitRequest(request)   }   private func configureProxy() {       os_log(.info, log: self.log, "will load configurations")     NSLog("QNEDNSProxy.Provider: controller")     NEDNSProxyManager.shared().loadFromPreferences { [weak self] error in         precondition(Thread.isMainThread)       }     os_log(.info, log: self.log, "logs indication the state of loading preferences")   }   override func viewDidLoad() {     super.viewDidLoad()     installSystemExtension() //    configureProxy()           // Do any additional setup after loading the view.   } // //  override var representedObject: Any? { //    didSet { //    // Update the view, if already loaded. //    } //  } } extension ViewController: OSSystemExtensionRequestDelegate {  func request(_ request: OSSystemExtensionRequest, actionForReplacingExtension existing: OSSystemExtensionProperties, withExtension ext: OSSystemExtensionProperties) -> OSSystemExtensionRequest.ReplacementAction {   os_log("DNSProxy: Replacing extension %@ version %@ with version %@", request.identifier, existing.bundleShortVersion, ext.bundleShortVersion)   return .replace  }     func requestNeedsUserApproval(_ request: OSSystemExtensionRequest) {   os_log("DNSProxy: Extension %@ requires user approval", request.identifier)  }     func request(_ request: OSSystemExtensionRequest, didFailWithError error: Error) {   os_log("DNSProxy: System extension request failed: %@", error.localizedDescription)  }     /* Other delegate methods here */  func request(_ request: OSSystemExtensionRequest, didFinishWithResult result: OSSystemExtensionRequest.Result) {   switch result {   case .completed:    manager = NEDNSProxyManager.shared()   case .willCompleteAfterReboot:     os_log("DNSProxy: willCompleteAfterReboot")   @unknown default:    os_log("DNSProxy: default")   }  } }
Oct ’22