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
1
vote
0 answers

Reachability Swift issue...unable to call method on Notification

I'm trying to integrate app level notifications for ReachabilitySwift https://github.com/ashleymills/Reachability.swift/tree/master So when I set the selector to #selector(reachabilityChanged(_:)) is says that there is a "Use of unresolved…
BostonMacOSX
  • 1,369
  • 2
  • 17
  • 38
1
vote
2 answers

How to test for iPhone connection to internet with swift 4?

For Swift 4/xcode: I have scoured the internet for a solution to this issue, but I have yet to find a definitive, comprehensive answer that covers all of the bases. There are several on Stack that answer the question to some extent, including swift…
Runeaway3
  • 1,439
  • 1
  • 17
  • 43
1
vote
2 answers

App crashes on Launch in Airplane Mode

I am currently using Ashley Mill's Reachability Class. If the application launches with network connectivity then I am able to toggle between connectivity availability without any issues and able to display a network connectivity Alert Controller…
lifewithelliott
  • 1,012
  • 2
  • 16
  • 35
1
vote
1 answer

Display an alert of reachability status

I'm using Reachability of ashleymills: https://github.com/ashleymills/Reachability.swift/releases In Xcode 7, I wrote a function to display an alert of reachability status. However, the alert never shows up. Here is my code: let reachability =…
GPH
  • 1,111
  • 6
  • 29
  • 49
0
votes
1 answer

What network protocol does Reachability use on iOS?

I am sure there is little % of iOS developers who haven't used Reachability, directly or via some framework like Alamofire. What I am interested what it actually does? The best guess I can make is that given host it opens sockets and then listens…
MegaManX
  • 8,766
  • 12
  • 51
  • 83
0
votes
2 answers

Handle internet connection automatically when internet goes off and comes again in swift 4

I am using reachability swift to handle internet conditions in swift 4.I can successfully detect if internet is working or not ,if internet is available my code navigates to the desired page successfully but if internet is not available it shows…
0
votes
0 answers

Mysterious crash with CoreTelephony on iPad thus not included

I need help to find a significant crash in out app. It has occurred after we switched from Carthage to Cocoapods and since we don't have CoreTelephony linked in out app, I assume it's a pod that's using it. But to be fair; I have no idea if that's…
esbenr
  • 1,356
  • 1
  • 11
  • 34
0
votes
1 answer

Connection is always giving me false?

I am using Reachability.swift to test the internet connection is (off/On) and the server is (live/dead) the server check work fine but internet Connection is always giving me false? @IBAction func TestNetwork(_ sender: Any) { var…
NinjaDeveloper
  • 1,620
  • 3
  • 19
  • 51
0
votes
2 answers

Tap to retry connect internet in Swift

I'm a beginner in Swift and I'm trying to make an alert for user to retry connecting to internet. I'm using Reachability by ashleymills. I'm confused on what to put on my alert handler since this is not working: func alertConnect() ->…
0
votes
1 answer

How to continuously appear alert while there is no internet connection?

I am working on an iOS app that requires internet connection to run properly so i'm using the Reachability framework so that I can obtain the connection state. Right now whenever there is no internet connection I have and alert with the button…
0
votes
1 answer

Swift iOS -AshleyMills Reachability keeps toggling wifi on and off every few secs

I downloaded the iOS sample Reachability project from AshleyMills Reachability It has a networkStatus label that says either: Wifi or No Connection Underneath that it has a hostNameLabel that says either: No host name or google.com or…
Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
0
votes
1 answer

Reachability issue while refreshing

First my code func checkInternetConnection() { reachability.whenReachable = { _ in self.loadPost() self.checkNewMessages() self.slowView.frame.size.height = 0 self.slowView.isHidden = true …
Zash__
  • 293
  • 4
  • 16
0
votes
1 answer

ReachabilitySwift can't be installed with CocoaPods

In my Podfile, I have: pod 'ReachabilitySwift', '~> 3.0' But when I run pod install, all the frameworks are setup correctly except ReachabilitySwift: Installing ReachabilitySwift 3 (was 2.4) [!] Error installing ReachabilitySwift [!] /usr/bin/git…
Paul T.
  • 4,938
  • 7
  • 45
  • 93
0
votes
3 answers

Checking for internet connection or wifi connection with reachabilitySwift

I'm building an iOS app, at some point i needed to check the app's acces to internet, so i used the ReachabilitySwift library. After some tests, it seems to me that the library only checks if the device has the wifi connected and not having an…
TheFuquan
  • 1,737
  • 16
  • 18
0
votes
1 answer

Swift 3 check internet connection with Reachability

so I'm looking at using this GitHub api to that checks for the reachability of a host.: https://github.com/ashleymills/Reachability.swift/tree/feature/ios10 however its pretty bare bones and I'm getting a few errors when trying to write a function…
Pippo
  • 1,439
  • 1
  • 18
  • 35