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

26 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Is there any official resource that lists all paths/URLs for iOS settings across versions?
HI! I am interested in redirecting the user to some specific iOS settings but just discovered that the paths/URLs to the settings change sometimes across iOS versions. Is there any official Apple resource with a list of all the paths for the iOS settings? Or at least for the latest iOS version? I found some non-official resources without citing the source, but it would be great to have official documentation about this topic. Thank you very much in advance for taking your time to read this post! Best regards, Iván
1
1
192
4d
calling SCNetworkReachabilityGetFlags in iOS16 does not return the correct flags as expected
Hi I just encountered an reachability detection problem by calling SCNetworkReachabilityGetFlags function in iOS 16. what did I do: on device iPhone 12, iOS 16.1.1, turn on Airplane Mode, call SCNetworkReachabilityGetFlags, got flags = kSCNetworkReachabilityFlagsTransientConnection | kSCNetworkReachabilityFlagsReachable on device iPhone 7, iOS 14.5.1, turn on Airplane Mode, call SCNetworkReachabilityGetFlags, got flags = 0 what I expect: I'm expecting SCNetworkReachabilityGetFlags on my iOS 16.1 device behave same as my iOS 14.5 device, returning flags = 0. It's inappropriate returning kSCNetworkReachabilityFlagsReachable in this case. Thank you!
1
0
127
2w
Global IPV6 DNS setting missing on machine with multiple Interface
We have Mac OS VM which has two network interfaces and both are active. In our application we need “State:/Network/Global/IPv6” to do some task but on this machine it seems to be missing, however if we disable one of the interface then the same setting seems to be available and our code works fine. Please find the attached screenshots of working & non-working details:
1
0
129
4w
Keychain Update Prompt Missing After Password Change on macOS 15.0.1
I've encountered an issue with the keychain on macOS 15.0.1. When an admin account changes the password for a non-admin local account, the system should prompt to unlock the login keychain at the next login, giving the user an opportunity to update the keychain password. However, when I attempted to change a local account password using an admin account through system configuration on macOS 15.0.1, the system did not show such a prompt. Instead, it directly created a new login keychain. In the keychain directory, I could see that the old keychain had been renamed to login_rename_X.keychain-db. Additionally, this operation caused the Touch ID and passwords saved in the keychain to be cleared. Does anyone know how to handle this issue so that the local account is prompted to update the keychain password during login?
1
0
255
Nov ’24
Apple Time Machine Sequoia 15.0.1
I have two time machines one is a western digital and the other is a Q Nap that ever since I upgraded to Sequoia, I cannot use. It’s an NAS device and Macke says that I have to contact the manufacturer of the product. They’re too old for me to contact them. My MacBook is new and it was working up until I had upgraded to Sequoia so I’m just trying to find out if that is a software glitch or an OS glitch. It is happening on both Max that I have so this is begging me the question that it’s an iOS update causation. It just sits and spins at the Time Machine preparing to back up and that is all that it does the first time it backed up probably until 25% and now it’s just doing this preparing to back up. I also have tried to wipe out the shares on both NAS machines and deleted the the files within the share to set it up again, and it still does not work.
2
0
303
Oct ’24
Fetch workgroup / active directory domain name programatically in Obj-C / Swift
Previously, I used to have the below code to get workgroup / domain name of the active directory service provider. SCDynamicStoreRef storeRef = SCDynamicStoreCreate(NULL, (CFStringRef)@"GetWorkgroup", NULL, NULL); CFPropertyListRef global = SCDynamicStoreCopyValue (storeRef,CFSTR("State:/Network/Global/SMB")); id workgroup = [(__bridge NSDictionary *)global valueForKey:@"Workgroup"]; On few Macs (probably starting from Sonoma), the workgroup property is not set. What is the alternative to get this information programatically?
1
0
235
Oct ’24
API to fetch dhcpv6 information
I am trying to fetch DHCP server identifiers of the current network. For IPv4 I am able to get this information using SCDynamicStoreCopyDHCPInfo and then using DHCPInfoGetOptionData fetching option 54. I am trying to do the same thing for IPv6, in my scutil I do see DHCPv6 present. Is there any API present which fetches this information for v6 DHCP servers, or do I have to get this direct from scutil?
5
0
361
Sep ’24
Simulator unable to connect to localhost, working fine when opened directly in laptop
I am trying to connect to localhost:8081 from simulator, but it is unable to connect with following logs: info 12:07:49.167248+0530 com.apple.WebKit.Networking nw_resolver_host_resolve_callback [C8.1] flags=0x40000003 ifindex=0 error=NoSuchRecord(-65554) hostname=localhost. addr=IN6ADDR_ANY ttl=60 info 12:07:49.167310+0530 com.apple.WebKit.Networking nw_resolver_host_resolve_callback [C8.1] flags=0x40000002 ifindex=0 error=NoSuchRecord(-65554) hostname=localhost. addr=INADDR_ANY ttl=108002 Macos 14.6.1 iOS simulator version 17.5 Som observations localhost:8081 does not load on simulator but 0.0.0.0:8081 loads fine, also 127.0.0.0:8081 loads fine on simulator. My laptop is a managed device with network filter Switching network sometimes fixes the issue. Restarting laptop sometimes fixes the issue. localhost:8081 opens find on laptop, but not on simulator. Contents of my laptop's /etc/hosts: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost
9
0
1.1k
Oct ’24
Connecting to EAP-PEAP Networks via NEHotspotConfigurationManager
I need to programatically connect to a Enterprise Network with security type EAP-PEAP. NEHotspotEAPSettings *eapSettings = [[NEHotspotEAPSettings alloc] init]; eapSettings.username = username; eapSettings.password = password; eapSettings.supportedEAPTypes = [NSArray arrayWithObjects:[NSNumber numberWithInteger:NEHotspotConfigurationEAPTypeEAPPEAP], nil]; //Inner authentication eapSettings.ttlsInnerAuthenticationType = NEHotspotConfigurationEAPTTLSInnerAuthenticationMSCHAPv2; eapSettings.outerIdentity = @""; //Server name of the network eapSettings.trustedServerNames = @[@"servername"]; if (@available(iOS 11.0, *)) { // Create Hotspot Configuration NEHotspotConfiguration *configuration = [[NEHotspotConfiguration alloc] initWithSSID:ssid eapSettings:eapSettings]; NSLog(@"WIFIManager, NEHotspotConfiguration initialized"); [[NEHotspotConfigurationManager sharedManager] applyConfiguration:configuration completionHandler:^(NSError * _Nullable error) { NSLog(@"WIFIManager, NEHotspotConfiguration Configured"); if (error != nil) { NSLog(@"WIFIManager, NEHotspotConfiguration Error: %@", error); if (error.code == NEHotspotConfigurationErrorAlreadyAssociated) { resolve(@(YES)); } else { reject(@"connection_error", @"Failed to connect to Wi-Fi", error); } } else { resolve(@(YES)); NSLog(@"WIFIManager, NEHotspotConfiguration Success"); } }]; }else { reject(@"ios_error", @"Not supported in iOS<11.0", nil); } } This is the code I have tried to connect to the network. It is always giving a true-negative result. As the documentation states, does NEHotspotConfigurationManager supports EAP-PEAP with MSCHAPv2 inner authentication? If it does, is it the correct way of implementing it? Is there any other way to connect to EAP-PEAP networks using Swift or Objective C?
2
0
475
Jul ’24
ld: symbol(s) not found for architecture arm64
I'm attempting to determine whether there is a currently logged on user via the SCDynamicStoreCopyConsoleUser function. My code look something along the lines of: #include &lt;SystemConfiguration/SystemConfiguration.h&gt; bool isUserLoggedOn() { CFStringRef name = SCDynamicStoreCopyConsoleUser(NULL, NULL, NULL); if (name != NULL) { CFRelease(name); return true; } return false; } I am getting the following error output on compilation: Undefined symbols for architecture arm64: "_CFRelease", referenced from: isUserLoggedOn() in UserInfo.cpp.o "_SCDynamicStoreCopyConsoleUser", referenced from: isUserLoggedOn() in UserInfo.cpp.o ld: symbol(s) not found for architecture arm64
4
0
668
Jul ’24
Ios18 bug on “Help apple improve search”
hey guyss…. Im currently using ios18 developer beta 2 on my iphoen 12…Idk if u guys noticed it or not.. but when i turn off the toggle for “Help improve apple search” (settings->search->help improve apple search) it again turns on without my knowledge seconds aftr i close the page. Ive tried restarting my iphone & many more.. nothing seems to work.. im kindoff a more private guy i usually turn off apple analytics.. usage diagnostics and i always make sure data is stored only on my local storage.. and this bug kinda piss me off 😕. i’ve given u the link below to check it out. Peace. https://youtube.com/shorts/YfVDCA-Dfrs?si=qLcl0mWL-Jm9iJFz
1
1
729
Jul ’24
How to Restrict App from Moving to Background and Prompt User for Exit Confirmation?
Hello Apple Developer Forum, I'm working on an iOS app and need to implement a feature where the app asks the user for confirmation before moving to the background. Specifically, when the user tries to send the app to the background, I want to display an alert asking "Are you sure you want to exit?" and based on their response, either allow the app to move to the background or prevent it from doing so. Could anyone provide a solution or guidance on how to achieve this? Thanks.
2
0
480
Jul ’24
How to detect that WiFi has no internet connection?
In some cases the user connects to a WiFi network that doesn't have internet access. The OS itself is able to display a warning in System Settings: However, in my app NWPathMonitor reports that the WiFi path is satisfied. How could I detect that the internet access is not working while WiFi is connected? I could try to connect to my own servers and report failures to the user, but that takes a long time to receive the timeout error. I cannot reduce the timeout, because maybe the user is on a very slow network and long loading time might be expected. But iOS can detect that there is not internet within a few seconds and display a warning, so I wonder how does Apple implement it in System Settings and if there is something I can implement in my app.
2
0
592
Jul ’24
iOS18 Contacts bug report
Dear developers, I am experiencing a bug with Contacts on my iPhone13 since downloading the beta. Some names in the listing of contacts do not correspond with their card once opened in the Contacts app. The option to share contacts in 3rd party apps has disappeared. Noticed specifically in WhatsApp where my contacts are no longer synced and no longer show against numbers. Best regards
1
0
531
Jul ’24
NEHotspotConfigurationManager removeConfiguration not working consistent
Hey, I'm currently developing an app that uses NEHotspotConfigurationManager to connect to and disconnect from a WiFi network based on user actions. I'm using the following code to connect and disconnect: Connect let configuration = NEHotspotConfiguration(ssid: ssid, passphrase: password, isWEP: false) configuration.joinOnce = true NEHotspotConfigurationManager.shared.apply(configuration) { (error) in if let error = error { print("Error connecting to WiFi network: \(error.localizedDescription)") } else { self.lastSSID = ssid } } Disconnect NEHotspotConfigurationManager.shared.removeConfiguration(forSSID: self.lastSSID) The issue I'm encountering is that the app successfully connects to the WiFi network and disconnects properly the first time. However, after connecting again, the second disconnect attempt fails to disconnect from the WiFi network. I found a similar bug report from 2020 that mentioned this issue. The suggested workaround involved setting joinOnce = false, which is not suitable for my app's requirements.
2
0
660
Jun ’24
Wi-Fi SSID information missing from System Configuration Framework since macOS 14.4
I have a small application (already published to the Mac App Store) to monitor, and notify the user of some important state changes about thier computer. To display Wi-Fi informations, I listening on the "State:/Network/Interface/.*/AirPort" events of the System Configuration framework. Before 14.4, the returned dictionary had an "SSID_STR" property which was contained the connected network name, but from 14.4, if "SSID_STR" are presents, it's will be always an empty string (""). My first idea was to put "NSLocationUsageDescription" into the Info.plist (and enable Location under App Sandbox in the Signing & Capabilities section) and try to request permission with the Core Locations requestWhenInUseAuthorization call, but even if i had the correct permission (.authorizedAlways), this will did not came to success. There are any workaround or entitlement available to get back the access to this information?
2
0
637
Jun ’24