11 Replies
      Latest reply on Sep 12, 2019 3:23 AM by piyush.patel
      piyush.patel Level 1 Level 1 (0 points)

        I am using NEHotspotConfigurationManager to connect wifi programmatically.

        Its an open Network without any password I am using below code:

         

        if (@available(iOS 11.0, *))

        {

        NEHotspotConfiguration *config = [[NEHotspotConfiguration alloc]initWithSSID:SSIDName];

        [NEHotspotConfigurationManager.sharedManager applyConfiguration:config completionHandler:^(NSError* error)

        {

              if (error

        )

        {

             printf([error description]);

        } else

        {

              printf(@"success");

        } }];

         

        I am connecting to the hostpot/access point of one device, but every time I am getting an error of unable to join but in response it goes to success as the error is nil. Is there any thing I need to add in configuration or add in setting or am I missing anything ?