iOS Question Is there a way to get all available WiFi network in range in i OS?

Discussion in 'iOS Questions' started by hanyelmehy, Apr 4, 2015.

  1. hanyelmehy

    hanyelmehy Active Member Licensed User

  2. Erel

    Erel Administrator Staff Member Licensed User

    Here:
    Code:
    Private Sub Application_Start (Nav As NavigationController)
       NavControl = Nav
       Page1.Initialize(
    "Page1")
       Page1.RootPanel.LoadLayout(
    "1")
       Nav.ShowPage(Page1)
       
    Dim no As NativeObject = Me
       
    Dim ssids As List = no.RunMethod("getSSIDs"Null)
       
    Log(ssids)
    End Sub

    #If OBJC
    #import <SystemConfiguration/CaptiveNetwork.h>
    - (NSMutableArray*)getSSIDs {
       NSMutableArray* res = [NSMutableArray new];
      NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
      for (NSString *ifnam in ifs) {
      NSDictionary *info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
      if (info[@"SSID"]) {
           B4IMap* map = [B4IMap new];
           map.dict = info;
           [res addObject:map];
      }
      }
       return res;
    }

    #End If
    It will return a list of maps. Each map holds the information of a network.
     
  3. moster67

    moster67 Expert Licensed User

    As far as I know, in iOS, it is not possible to scan a network and obtain information of available access-points. You can only get information from the access-point your device is connected to.

    I'd love to be corrected since this is a feature I'd love to see implemented.
     
  4. hanyelmehy

    hanyelmehy Active Member Licensed User

    Thank you i well try this
     
  5. touchsquid

    touchsquid Active Member Licensed User

    I tried this. It works but only returns the connected network, although there are 4 or 5 others in range.
     
  6. moster67

    moster67 Expert Licensed User

    That is what I wrote in my previous post. It's a limitation of iOS.
     
  7. b4xscripter

    b4xscripter Member Licensed User

    So, no way to detect a "unknown" wifi? I don't mean the mac address, I only mean the public wifi name. That is a bit strange as from Iphone / Ipad we can always see the available (visible) wifi hotspots when we try to connect to.

    Regards
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    There are many things that the OS can do and regular apps can't.
     
  9. tmf

    tmf Member Licensed User

    I see this is an old thread, but wanted to know if you can connect to a known AP, so proprietorially can you say connect to "X" if you know X is there....
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    You should always start a new thread for your questions.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice