-
Notifications
You must be signed in to change notification settings - Fork 949
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
[4.2] Reachability()?.connection returns .none right after been initialized #307
Comments
@Drusy That looks like a regression. Thanks for reporting, I'll take a look Cheers |
In the sample iOS app in the repo, I tried printing
|
@ashleymills my sample is as simple as this
I am not calling |
OK, I see the problem. I'll push a fix later today. |
@ashleymills I'm still experiencing this issue with version 4.2.1 when building my project with Xcode 10 final release and iOS 12 SDK. The scenario is the following one:
I was also observing the following message in console output: "[NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}" In order to fix the issue, I had to manually add CoreTelephony as a required dependency. Everything works as expected now, both on iOS 12 and older versions when building the app with the final version of Xcode 10 and using Swift 4.2. The message still appears on iOS simulator (and does not work, obviously) but it does not on a real device. I'd suggest you either to update README.md file to add this information or update podspec file to add CoreTelephony as a subspec/dependency. |
In 4.1, the following code
Reachability().connection
would provide.wifi
or.cellular
.Since 4.2,
Reachability().connection
returns.none
right after the initialization.After a while, if subscribing to the notifications, the value returns to the real reachability state.
Is this the designed behavior or is this a regression ?
Regards
The text was updated successfully, but these errors were encountered: