Note that there are some explanatory texts on larger screens.

plurals
  1. POiphone slow to recognize change of wifi access point
    text
    copied!<p>I have an app that needs to connect to a particular AP. This AP is not connected to the internet. when i change networks in "settings" to this new AP, i can see that i have received an ip address within a few seconds, but it takes 60-70 seconds for the wifi symbol in the status bar to appear. when i return to my app, i cannot connect to the AP until this symbol appears. once it appears, the connection works perfectly, but 60 seconds is a long time for the user to wait. I am using NSStreamManager to commuicate with the AP.</p> <p>I do not understand why i can not connect as soon as settings shows an ip address. I know that apple does not allow for in-app control of network settings. any suggestions would be appreciated.</p> <p>Further Information:</p> <p>In an effort to understand the problem, I added a timer loop that starts as soon as i open the app, after changing to the new wifi network. it reports reachability status (via the apple reachability class) and attempts to get the SSID. if these two methods succeed then it sends a JSON message to the AP using streamManager, if not it calls itself again in one second. The plug is reachable and the SSID readable, on the very first loop (less than 1 second) BUT it still takes stream manager the balance of the 60 seconds to complete. I don't believe the problem is on the AP side, as the android version of the app has no problem connecting. </p> <pre><code>-(BOOL)didConnect{ NSString *ssidString=[self.serverCommManager fetchSSIDInfo]; NSString *ssidStart=[ssidString substringToIndex:5]; NSLog(@"****:didConnect ssidStart=%@ ",ssidStart); if([ssidStart isEqualToString:@"Ppppp"]){ NSLog(@"****:didConnect isEqual=TRUE"); self.streamManager = [[NSStreamManager alloc] initWithDelegate:self]; [self.streamManager connectToHost:PlugHostName onPort:PlugPort withMessage: [JSONQuery queryIsPlug]]; [self removeWaitView]; return YES; }else{ NSLog(@"****:PlugSetupTVC didConnect isEqual=FALSE"); [self startTimingWithInterval:1]; return NO; } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload