Questions tagged [reachability-swift]

Use this tag for all questions about Ashley Mills' Reachability.Swift library for macOS, iOS, tvOS

Reachability.swift is a Swift replacement for Apple's Objective-C sample code, with closures.

Github - https://github.com/ashleymills/Reachability.swift

Cocoapods - https://cocoapods.org/pods/ReachabilitySwift

31 questions
8
votes
3 answers

Swift 3: Checking Internet (Reocurring) viewDidAppear not

Ok, So I am rather new to Swift and I am a little confused about what I am trying to do, or if I am going in the wrong direction. (https://github.com/ashleymills/Reachability.swift) Here is my viewDidLoad method : override func viewDidLoad() { …
JamesG
  • 1,552
  • 8
  • 39
  • 86
4
votes
3 answers

How to check if device is having poor internet connection in swift

I want to check if device is having very slow internet connection. I have used Reachability class to check for internet connection is available or not. But here i want to check after every few sec that internet speed is not poor. Is this possible to…
Hardik Vyas
  • 1,973
  • 1
  • 20
  • 43
4
votes
1 answer

Is it possible to check if WiFi is connected but there is no internet connection in Swift using Reachability?

I don't know if this is possible but here's my question - When the WiFi is connected & the internet is ON then Yellow Light glows on Router When the WiFi is connected & the Internet is OFF then Red Light glows on Router So is it possible to…
deadcoder0904
  • 7,232
  • 12
  • 66
  • 163
3
votes
1 answer

Cannot force unwrap value of non-optional type 'Reachability' for swift 5

I get the warning xcode 11.1 for iOS 13 (swift 5) Cannot force unwrap value of non-optional type 'Reachability' on the line let reachability = Reachability()! I tried, if statements and try do, but none seem to work.Removing the ! gives the warning…
Wil
  • 351
  • 3
  • 9
3
votes
2 answers

Internet connection status swift reachability

I have the following code to determine whether if there is an internet connection or no. This code works fine. How Can I know if I suddenly lost the connection var reachability:Reachability? reachability = Reachability() self.reachability =…
Ahmed
  • 1,229
  • 2
  • 20
  • 45
3
votes
1 answer

Notify user reachability (Ashley Mills' Reachability)

I made an app, I want to add function that notify user when app's internet reachability is changed. I use Ashley Mills' Reachability.swift file. now I understand how it works, So I put code that when internet reachability is changed, it will print…
Janghyup Lee
  • 167
  • 3
  • 17
2
votes
1 answer

Can't build my Swift application using my own framework after xcode's 12.5 update

Since the xcode's 12.5 update, I can't build my application using my own framework. Failed to build module 'mySwiftxcFramework' from its module interface; the compiler that produced it, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45…
gamerounet
  • 279
  • 4
  • 22
2
votes
2 answers

iOS Unexpected platform condition (expected 'os', 'arch', or 'swift') - Reachability

I just update my pods. after update Reachability causing an error Unexpected platform condition (expected 'os', 'arch', or 'swift') I tried to build and clean but it does not work. what's the solution? Please help me to fix this. Thanks in…
Anshul Arora
  • 155
  • 3
  • 10
2
votes
1 answer

Creating an easy to use extension/function for Reachability (host/internet WIFI, Cellular)

I am working on a complex app and I want to test both host in internet reachability on each ViewController that receive data from server I am currently using this library for Reachability https://github.com/ashleymills/Reachability.swift And I…
UncleJunior
  • 231
  • 1
  • 2
  • 12
2
votes
0 answers

4G not recognized by Reachability

I'm using Reachability.swift from Ashley Mills (https://github.com/ashleymills/Reachability.swift). I use the following code to request the current network status: do { reachability = try Reachability.reachabilityForInternetConnection() } catch…
1
vote
0 answers

How to solve strange behavior Reachability.swift in simulator?

I am using Reachability.swift to monitor the connection. However, the answer always comes with a delay of 1 step .Below is the code snippet: override func viewWillAppear(_ animated: Bool) { …
AlexM
  • 31
  • 1
  • 6
1
vote
1 answer

XCode 11.2, simulator iOS 11 crashes with error "dyld: lazy symbol binding failed: Symbol not found..."

Using AWSAppSync ios sdk, trying to configure the AWSAppSyncClient, and the simulator crashes when trying to create a Reachability instance (when trying to get the UserPoolsAuthProvider): let appSyncConfig = try…
1
vote
1 answer

NotificationCenter addObserver for reachabilityChanged not working

Here, i would like to addObserver to check if i got internet connection, i used reachability-swift 5.0 from https://github.com/ashleymills/Reachability.swift and i use this code func application(_ application: UIApplication,…
1
vote
2 answers

Using Reachability in Swift 5

I followed this tutorial to try and get Reachability installed and usable in my project (https://medium.freecodecamp.org/how-to-handle-internet-connection-reachability-in-swift-34482301ea57) It states it's all installed but I still get an error on…
Dan
  • 2,304
  • 6
  • 42
  • 69
1
vote
0 answers

iOS swift 4 Add notification listener for network connection status from any class

I am using ashleymills/Reachability.swift to check network connection status. When I use it in a particular class in viewWillAppear method, it works just fine. But currently I have more that 40 classes and I don't think I need to implement the…
user8994346
1
2 3