ios - NEHotspotHelper not getting registered -


i trying achieve (that text written below wifi ssid):

enter image description here

this current code unable register nehotspothelper. have added network extension entitlement provisioning profile. not sure going wrong

    let options = [         knehotspothelperoptiondisplayname : "free"     ]      let queue = dispatchqueue(label: "asad test", attributes: dispatchqueue.attributes.concurrent)       _ = nehotspothelper.register(options: options [string : nsobject], queue: queue, handler: {(cmd: nehotspothelpercommand) -> void in          // 2-- evaluate state         if  cmd.commandtype == .evaluate {             let list1 = cmd.network!             //  print("evaluation required high")              let connectednetwork = list1             // print("supported network interface: \(connectednetwork)")             connectednetwork.setconfidence(.high)              let response = cmd.createresponse(.success)             response.setnetwork(connectednetwork)             response.deliver()         }           // 1 -- scan list of wif         if let list = cmd.networklist, cmd.commandtype == .filterscanlist  {             var isfree = 0              var networks = [nehotspotnetwork]()             network in list {                 if self.currentssid.contains("free") || self.currentssid.contains("free") {                     // if free found add helper him                     print("created \(network.ssid)")                     network.setconfidence(.high)                     //network.setpassword("f4dd6657")                     networks.append(network)                     isfree = 1                  }              }              if isfree == 1 {                 let response = cmd.createresponse(.success)                 response.setnetworklist(networks)                 response.deliver()             }          }           //  3---do authenticating process here e.g json processing         if (cmd.commandtype == .authenticate) {             print("authtication required")              let response = cmd.createresponse(.success)             response.deliver() //respond          }      }); 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -