- (void) registerHotspot: (NEHotspotNetwork*) network andCommand:(NEHotspotHelperCommand*) cmd
{
if ([network.SSID isEqualToString:@"Chameleon Cafe"])
{
[network setConfidence:kNEHotspotHelperConfidenceHigh];
[network setPassword:@"chamcafe"];
NEHotspotHelperResponse *response = [cmd createResponse:kNEHotspotHelperResultSuccess];
NSLog(@"Response CMD %@", response);
[response setNetworkList:@[network]];
[response setNetwork:network];
[response deliver];
}
NEHotspotNetwork * myNetwork = [[NEHotspotNetwork alloc] init];
}
答案 0 :(得分:0)
func registerHotspot(network : NEHotspotNetwork, andCommand cmd : NEHotspotHelperCommand){
if(network.SSID == "Chameleon Cafe"){
network.setConfidence(.High)
network.setPassword("chamcafe")
let response : NEHotspotHelperResponse = cmd.createResponse(.Success)
print("Response CMD \(response)")
response.setNetworkList([network])
response.setNetwork(network)
response.deliver()
}
let myNetwork = NEHotspotNetwork()
}