Skip to content

iOS13 release version not working #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
luzsyn opened this issue Sep 23, 2019 · 52 comments
Closed

iOS13 release version not working #7

luzsyn opened this issue Sep 23, 2019 · 52 comments

Comments

@luzsyn
Copy link

luzsyn commented Sep 23, 2019

In some devices still not working, CNCopySupportedInterfaces() return nil, already get the location authorization, very strange

@Benny-iPhone
Copy link

#me_too

@kendgin
Copy link

kendgin commented Sep 24, 2019

me too

@fanwu8184
Copy link

same here. Any solution?

@HackingGate
Copy link
Owner

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.

@fanwu8184
Copy link

Yes, I am working on iOS 13.0

@Benny-iPhone
Copy link

Yes, I am working on iOS 13.0.
Installed the app from both Xcode 10.3 and Xcode 11

@luzsyn
Copy link
Author

luzsyn commented Sep 24, 2019

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)

@kendgin
Copy link

kendgin commented Sep 24, 2019

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.

@platinum7919
Copy link

Same here.

  • Has location service enabled and allowed
  • Has Access Wifi entitlement

@fanwu8184
Copy link

The problem solved after updating my phone to iOS 13.1 which you can download now.

@barunkn10
Copy link

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
    }

@fanwu8184
Copy link

  • Has location service enabled and allowed
  • Has Access Wifi entitlement

Did you make sure of these?

@barunkn10
Copy link

Yes, I did.

Below, check is successful for me -
let status = CLLocationManager.authorizationStatus()
if status == .authorizedWhenInUse {
...
}

@barunkn10
Copy link

also,
com.apple.developer.networking.wifi-info

@fanwu8184
Copy link

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
}

@barunkn10
Copy link

Thanks for the info. However, interfaceInfo in below code is still returning nil for me.

let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary?

@PadrePedro
Copy link

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.

@platinum7919
Copy link

platinum7919 commented Sep 25, 2019

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

@PadrePedro
Copy link

PadrePedro commented Sep 26, 2019

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.

@barunkn10
Copy link

(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.

@oflannabhra
Copy link

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?

@PadrePedro
Copy link

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.

@Raphzz
Copy link

Raphzz commented Oct 4, 2019

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.

@mrsnk
Copy link

mrsnk commented Oct 8, 2019

+1

@james-flume
Copy link

Any updates on this?

@PadrePedro
Copy link

PadrePedro commented Oct 11, 2019

I found another phone with this issue, captured logs again and provided to Apple on 10/9. Waiting for response.

@james-flume
Copy link

Thanks @PadrePedro , keep us posted

@eklektek
Copy link

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

@Ricardo1980
Copy link

Same problem in iOS 13.1.3

@luzsyn
Copy link
Author

luzsyn commented Oct 24, 2019

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?

@kevin3747118
Copy link

After the device rebooting, it works...also make me embarrassed during the demo.
iOS13.1.2

@Ricardo1980
Copy link

Kevin, it will start failing 2 or 3 after rebooting. At least that is my case.

@kevin3747118
Copy link

@Ricardo1980 Do you mean that it will fail at the first time ? what's your iOS version ?

@Ricardo1980
Copy link

I am using 13.2
It will work for several hours. After that, it does not work. That is my case.

@PadrePedro
Copy link

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.

@james-flume
Copy link

@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.

@shanez
Copy link

shanez commented Nov 4, 2019

@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
Copy link

@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.

@PadrePedro
Copy link

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!

@inf3rnus
Copy link

inf3rnus commented Nov 8, 2019

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?

@kcchen2012
Copy link

We also have some customers to report the issue exists on their devices, still can't find a perfect resolution.

@james-flume
Copy link

@kcchen2012 we started using FGRoute instead of the native wifi Interfaces and have not seen the issue since.

@kcchen2012
Copy link

@kcchen2012 we started using FGRoute instead of the native wifi Interfaces and have not seen the issue since.

thanks for your reply.

@platinum7919
Copy link

I tried FGRoute, but I still have the same issue. It returns nil

@vadzimrudkouski
Copy link

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.

@nneuberger1
Copy link

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.

https://github.com/Feghal/FGRoute

@Feghal
Copy link

Feghal commented Dec 18, 2019

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?

@nneuberger1
Copy link

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.

@HackingGate
Copy link
Owner

The issue is not reproducible on iOS 13.3. Closing.

@qianlishun
Copy link

qianlishun commented Apr 22, 2020

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.

@qianlishun
Copy link

@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

@Glumelin
Copy link

我在设备iPhone 6s Plus,iOS 13.5.1 中复现了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests