System Configuration

RSS for tag

System Configuration allows applications to access a device’s network configuration settings and determine the reachability of the device.

Posts under System Configuration tag

83 Posts

Post

Replies

Boosts

Views

Activity

Can I use NEHotspotConfigurationManager to prevent "The Wi-Fi network does not appear to be connected to the internet" prompt using Wi-Fi IoT Device
My users get a prompt that disrupts the use of my app. The prompt comes more than 10 seconds into using a remote controlled IoT device via WiFi. The device is a drone, so it's not plausible to pause and it's absurd to have them wait so long for this prompt to appear to begin flight safely. The Wi-Fi network "MySSID" does not appear to be connected to the Internet Do you want to temporarily use cellular data? Use Cellular Data Keep Trying Wi-Fi I connect with NEHotspotConfigurationManager https://developer.apple.com/documentation/networkextension/nehotspotconfigurationmanager     hotspotConfig = NEHotspotConfiguration(ssid: mySSID)     guard let hotspotConfig = hotspotConfig else {       print("Error while connecting to WiFi")       return     }     hotspotConfig.joinOnce = true     NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: ssid)     NEHotspotConfigurationManager.shared.apply(hotspotConfig) { [self] (error) in       if let error = error {         print(self.handleConnectionError(error))         completion(false)       } else if self.wifiConnectionInfo() != nil {         completion(true)       } else {         completion(false)       }     } How do I prevent this? Or is there any workaround?
3
0
1.6k
Dec ’21
DNS in VPN split tunneling
Hi all. I have the following scenario; MacOs only with IPv6 support (IPv4 disabled). VPN application with both IPv4 and IPv6 support. My VPN app is creating three services thru NetworkConfiguration API; one is to register DNS (for IPv4 and IPv6), second is the IPv4 service with tunnel information (with override set to 0, because I have split tunnelling). Third is the IPv6 service, with tunnel IP also. I'm facing a problem with DNS, when the Override is set to true, I can see the DNS listed. But when override is set to disable, the DNS disappear. The idea is to have the IPv4 service with tunnel information, but with DNS configured. What is the best way to set the DNS when IPv4 and IPv6 tunnel are required?
1
0
1.2k
Oct ’21
CNCopySupportedInterfaces takes around 30-40s to return current connected ssid.
In our iOS application there are many places where we need to fetch current connected ssid and we are fetching it from CNCopySupportedInterfaces.We are observing an issue where CNCopySupportedInterfaces is taking 30 to 40 seconds to fetch ssid name which is therefore blocking the main thread and leading to make our application crash. We did not find any issues calling this api CNCopySupportedInterfaces on main thread specified in any of the apple documents. Please note we are experiencing this issue only in a particular network environment. Code snippet : (NSString *)getwifiName{ NSString *wifiStr = nil; CFArrayRef arrayRef = CNCopySupportedInterfaces(); NSArray *interfaces = (_bridge NSArray *)arrayRef; if (interfaces) { for (NSString *interfaceName in interfaces) { CFDictionaryRef dictRef = CNCopyCurrentNetworkInfo((CFStringRef)interfaceName); if (dictRef != NULL) { NSDictionary *networkInfo = (bridge NSDictionary *)dictRef; wifiStr = [NSString stringWithFormat:@"%@",[networkInfo objectForKey:@"SSID"]]; CFRelease(dictRef); } } CFRelease(arrayRef); } if(wifiStr == nil) { wifiStr = [NSString stringWithFormat:NSLocalizedString(@"MobileDeviceWIFINotEnable",nil)]; } NSLog(@"Connected WifiStr - %@",wifiStr); return wifiStr; }
5
0
1.5k
Sep ’21
Can I use NEHotspotConfigurationManager to prevent "The Wi-Fi network does not appear to be connected to the internet" prompt using Wi-Fi IoT Device
My users get a prompt that disrupts the use of my app. The prompt comes more than 10 seconds into using a remote controlled IoT device via WiFi. The device is a drone, so it's not plausible to pause and it's absurd to have them wait so long for this prompt to appear to begin flight safely. The Wi-Fi network "MySSID" does not appear to be connected to the Internet Do you want to temporarily use cellular data? Use Cellular Data Keep Trying Wi-Fi I connect with NEHotspotConfigurationManager https://developer.apple.com/documentation/networkextension/nehotspotconfigurationmanager     hotspotConfig = NEHotspotConfiguration(ssid: mySSID)     guard let hotspotConfig = hotspotConfig else {       print("Error while connecting to WiFi")       return     }     hotspotConfig.joinOnce = true     NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: ssid)     NEHotspotConfigurationManager.shared.apply(hotspotConfig) { [self] (error) in       if let error = error {         print(self.handleConnectionError(error))         completion(false)       } else if self.wifiConnectionInfo() != nil {         completion(true)       } else {         completion(false)       }     } How do I prevent this? Or is there any workaround?
Replies
3
Boosts
0
Views
1.6k
Activity
Dec ’21
DNS in VPN split tunneling
Hi all. I have the following scenario; MacOs only with IPv6 support (IPv4 disabled). VPN application with both IPv4 and IPv6 support. My VPN app is creating three services thru NetworkConfiguration API; one is to register DNS (for IPv4 and IPv6), second is the IPv4 service with tunnel information (with override set to 0, because I have split tunnelling). Third is the IPv6 service, with tunnel IP also. I'm facing a problem with DNS, when the Override is set to true, I can see the DNS listed. But when override is set to disable, the DNS disappear. The idea is to have the IPv4 service with tunnel information, but with DNS configured. What is the best way to set the DNS when IPv4 and IPv6 tunnel are required?
Replies
1
Boosts
0
Views
1.2k
Activity
Oct ’21
CNCopySupportedInterfaces takes around 30-40s to return current connected ssid.
In our iOS application there are many places where we need to fetch current connected ssid and we are fetching it from CNCopySupportedInterfaces.We are observing an issue where CNCopySupportedInterfaces is taking 30 to 40 seconds to fetch ssid name which is therefore blocking the main thread and leading to make our application crash. We did not find any issues calling this api CNCopySupportedInterfaces on main thread specified in any of the apple documents. Please note we are experiencing this issue only in a particular network environment. Code snippet : (NSString *)getwifiName{ NSString *wifiStr = nil; CFArrayRef arrayRef = CNCopySupportedInterfaces(); NSArray *interfaces = (_bridge NSArray *)arrayRef; if (interfaces) { for (NSString *interfaceName in interfaces) { CFDictionaryRef dictRef = CNCopyCurrentNetworkInfo((CFStringRef)interfaceName); if (dictRef != NULL) { NSDictionary *networkInfo = (bridge NSDictionary *)dictRef; wifiStr = [NSString stringWithFormat:@"%@",[networkInfo objectForKey:@"SSID"]]; CFRelease(dictRef); } } CFRelease(arrayRef); } if(wifiStr == nil) { wifiStr = [NSString stringWithFormat:NSLocalizedString(@"MobileDeviceWIFINotEnable",nil)]; } NSLog(@"Connected WifiStr - %@",wifiStr); return wifiStr; }
Replies
5
Boosts
0
Views
1.5k
Activity
Sep ’21