iOS13 release version not working
Closed this issue · 52 comments
In some devices still not working, CNCopySupportedInterfaces() return nil, already get the location authorization, very strange
#me_too
me too
same here. Any solution?
Hi all,
Couldn't reproduce it on iOS 13.1 beta 4.
Is it happens on iOS 13.0 final release?
Please provide more details.
Yes, I am working on iOS 13.0
Yes, I am working on iOS 13.0.
Installed the app from both Xcode 10.3 and Xcode 11
It happens on iOS 13.0 final release and in some devices. Before 13.0 the code works, but not working after update to 13.0. Accounting to the user's feedback, CNCopySupportedInterfaces() return nil.(Already access loaction permission)
Before 13.0 the code works, but not working after update to 13.0 final release. CNCopySupportedInterfaces() return nil.(Already access loaction permission)
The problem solved after updating my phone to iOS 13.1 now.
Same here.
- Has location service enabled and allowed
- Has Access Wifi entitlement
The problem solved after updating my phone to iOS 13.1 which you can download now.
No, this is not working in iOS 13.1. CNCopyCurrentNetworkInfo is returning NIL
private func updateSSID() -> String? {
guard let interfaceNames = CNCopySupportedInterfaces() as? [String] else {
return nil
}
return interfaceNames.compactMap { name in
guard let info = CNCopyCurrentNetworkInfo(name as CFString) as? [String: AnyObject], let ssid = info[kCNNetworkInfoKeySSID as String] as? String else {
return nil
}
return ssid
}
.filter({ (ssid) -> Bool in
!ssid.isEmpty
}
)
.first ?? nil
}
- Has location service enabled and allowed
- Has Access Wifi entitlement
Did you make sure of these?
Yes, I did.
Below, check is successful for me -
let status = CLLocationManager.authorizationStatus()
if status == .authorizedWhenInUse {
...
}
also,
com.apple.developer.networking.wifi-info
It works fine to me by using HackingGate's code below:
import Foundation
import SystemConfiguration.CaptiveNetwork
func getSSID() -> String? {
var ssid: String?
if let interfaces = CNCopySupportedInterfaces() as NSArray? {
for interface in interfaces {
if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? {
ssid = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String
break
}
}
}
return ssid
}
Thanks for the info. However, interfaceInfo in below code is still returning nil for me.
let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary?
Working for me, but I have users for whom it does not work, even after granting location permissions. I haven't been able to determine why.
Works for me this morning, but not anymore. This is very strange. Same code.
- Works for 12.4.1
- Doesn't work for 13.0
- Worked once in 13.1 (same build)
- Has entitlement
- Has location permission
Edit: (on 13.1)
When it doesn't work, I restart the device then launch the app again then it works.
When it doesn't work, The location indicator (array) is always on (sometime hollow).
Seems like it will only work for a few minutes after launch
Edit:
After the 3rd device restart it now works with no problem
I encountered one iOS 13.1 device where CNCopyCurrentNetworkInfo always returned nil. After rebooting the device, it started working! Can you guys try rebooting? I'm trying it figure out if rebooting is a possible workaround, or just a fluke. Thanks.
PS: I also filed a bug with Apple.
(1) It seems to me, the location permission value is getting wiped out (Apple internal issue?). So, if we go manually and turn location service for our app is equal to "Always" ( in iOS 13, Apple has stopped programmatically setting permission value as "Always"). Then, I am getting SSID value all the time.
(2) Restart of device is also solving issue in few cases.
Like others, I am getting reports from users that even after they have granted location permissions, my app still thinks they are not connected to WiFi (ie, CNCopyCurrentNetworkInfo
returns nil
). I have reports of this across:
- 13.0
- 13.1
- 13.1.1
- 13.1.2
Updating to a new version seems to fix the issue, at least for some users.
Has anyone filed a radar with Apple? If so, could you link here?
I have filed a bug with Apple. They said the sysdiagnose logs I provided did not include the call to CNCopyCurrentNetworkInfo. Unfortunately, I restarted that iPhone and it no longer exhibits the issue, so I'm looking for another phone to capture the logs.
So far, I am aware of 3 iPhones with this issue, and all 3 were resolved with a restart.
Faced this same issue today. We have 2 QA devices updated to 13.1.2, on one it worked fine and the other required 2 reboots to work as well.
+1
Any updates on this?
I found another phone with this issue, captured logs again and provided to Apple on 10/9. Waiting for response.
Thanks @PadrePedro , keep us posted
I found that it worked, but only once for each app instance.
So if I changed network while my app was running, on returning to the foreground there was no location update and the new network wasn't registered by the app. Had to close and re-open. On 13.1.2
Same problem in iOS 13.1.3
Very unstable, some users updated the newest system version, it works some days, but from yesterday, it doesn`t works.
@PadrePedro Do you have receive response from Apple?
After the device rebooting, it works...also make me embarrassed during the demo.
iOS13.1.2
Kevin, it will start failing 2 or 3 after rebooting. At least that is my case.
@Ricardo1980 Do you mean that it will fail at the first time ? what's your iOS version ?
I am using 13.2
It will work for several hours. After that, it does not work. That is my case.
Very unstable, some users updated the newest system version, it works some days, but from yesterday, it doesn`t works.
@PadrePedro Do you have receive response from Apple?
Nothing from Apple since I submitted logs on 10/9. I requested status update on 10/23, but still nothing.
@PadrePedro is there a ticket open somewhere on apple that we can contribute to? I have observed the same behavior as everyone in this thread.
@james-flume We can solve this by doing an IP address comparison. The risk here is relative to the amount of routers that may use that IP address as their default AP mode address. Even given this risk, it seems to be the best path forward.
@PadrePedro is there a ticket open somewhere on apple that we can contribute to? I have observed the same behavior as everyone in this thread.
The ticket I opened is through Apple's Feedback Assistant. There has been no reply to this issue from Apple since Oct 9th. I tried to escalate the issue via Apple Developer Technical Support, but they referred me back to Feedback Assistant. It is not a public forum so I have no way to share the thread.
Good news! I was contacted by Apple today to test out the fix for this issue on iOS 13.3 beta 1 (17C5032d). Test away!
I've been spending months trying to fix my code, and low and behold we've discovered it's a bug... @PadrePedro Thank you for your efforts, they're invaluable.
So I guess we're all just dead in the water until Apple gets their fix in place?
We also have some customers to report the issue exists on their devices, still can't find a perfect resolution.
@kcchen2012 we started using FGRoute instead of the native wifi Interfaces and have not seen the issue since.
@kcchen2012 we started using FGRoute instead of the native wifi Interfaces and have not seen the issue since.
thanks for your reply.
I tried FGRoute, but I still have the same issue. It returns nil
Good news! I was contacted by Apple today to test out the fix for this issue on iOS 13.3 beta 1 (17C5032d). Test away!
I wonder whether anyone reproduced the issue on iOS 13.3.
After installing the 13.3 GM release, I was able to get the command to work fine by this github page.
I was also able to get the FGRoute pod to work fine except for the FGRoute.getSSIDDATA() function as it's causing my application to crash, although I don't need that function.
Hello everyone, I am the FGRoute maintainer, just tested on iOS 13.3 with Xcode 11.1 and it works fine, I think it may be related to Xcode version, what version do you use?
FWIW, I was using XCode 11.2.1 and iOS 13.1 variant (I think roughly) when I found the issue. Running 11 SDK minimum compilation.
The issue is not reproducible on iOS 13.3. Closing.
This still exists in iOS 13.3, iPad mini4
CNCopySupportedInterfaces() is nil.
And Using NEHotspotConfigurationManager will throw
NEHotspotConfigurationManager Error Domain=NEHotspotConfigurationErrorDomain Code=13 "already associated."
In IOS 13.1 13.2, Code=8 " internal error ”
I rebooted the device many times in an hour and repeated the problem.
@kcchen2012 we started using FGRoute instead of the native wifi Interfaces and have not seen the issue since.
The principle of getting SSID is the same, use CNCopySupportedInterfaces().
What makes you think another one can solve the problem
我在设备iPhone 6s Plus,iOS 13.5.1 中复现了