Inconsistency in displaying WiFi annotations

We are using NEHotspotHelper to annotate the networks when the user opens settings page.

The annotations are not getting displayed for My Networks section on the settings page (the networks user has already connected to atleast once shows up in this section), while the annotations are visible for Other Networks (this is the access point list which the user has never connected to). Also we have observed that if we click on the "i" button next to the wifi access point name and come back to the wifi settings page again, then the annotation shows up again We are using the following code -

dispatch_queue_t hotspotQueue = dispatch_queue_create("hotspot_queue", 0);
NSString *annotation = @"Custom annotation";
NSDictionary *hotspotHelperRegisterOptions = [NSDictionary dictionaryWithObjectsAndKeys:annotation, kNEHotspotHelperOptionDisplayName, nil];
BOOL returnVal = [hotspotHelperClass registerWithOptions:hotspotHelperRegisterOptions
                          queue:hotspotQueue
                         handler: ^(NEHotspotHelperCommand * cmd) {
  if(cmd.commandType == kNEHotspotHelperCommandTypeFilterScanList) {
    NSMutableArray<NEHotspotNetwork*> *annotatedNetworks = [[NSMutableArray alloc] initWithCapacity:0];
    for(NEHotspotNetwork* network in cmd.networkList){
      [network setConfidence:kNEHotspotHelperConfidenceHigh];
      [annotatedNetworks addObject:network];
    }
    NEHotspotHelperResponse *response = [cmd createResponse:kNEHotspotHelperResultSuccess];
    [response setNetworkList:annotatedNetworks];
    [response deliver];
    return;
  }];
Answered by Systems Engineer in 698481022

The fact that when you tap on the Info button and then come back to the screen and the kNEHotspotHelperOptionDisplayName options are these tells me that this is a refresh or redraw issue on our end for the list or UITableView that is displaying this data. Another thing you could try is just to use a single value for all networks like so:

let networkOptions: [String : NSObject] = [kNEHotspotHelperOptionDisplayName: alternativeName as NSString]

If this presents the same behavior then I suspect it's a UI / redraw issue and you should open a bug report there.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Accepted Answer

The fact that when you tap on the Info button and then come back to the screen and the kNEHotspotHelperOptionDisplayName options are these tells me that this is a refresh or redraw issue on our end for the list or UITableView that is displaying this data. Another thing you could try is just to use a single value for all networks like so:

let networkOptions: [String : NSObject] = [kNEHotspotHelperOptionDisplayName: alternativeName as NSString]

If this presents the same behavior then I suspect it's a UI / redraw issue and you should open a bug report there.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Inconsistency in displaying WiFi annotations
 
 
Q