iOS Xcode - Reachability (TonyMillion) - Show alert if iOS app does not have Network Connectivity

StackOverflow https://stackoverflow.com/questions/11527034

Вопрос

I've been trying to implement this (https://github.com/tonymillion/Reachability/) into my iOS iPhone app for 4 hours. I've seen other questions on SO about it, but none explicitly show how to implement the code. Can someone please help?

All I want to do is show an alert if they are not connected (or lose connectivity) to the network (WiFi or Cellular).

Can someone PLEASE tell me what code to put where? Thanks SOOO much! I can post code or anything if needed.

Это было полезно?

Решение

Have a look at Apple reachability sample code here : http://developer.apple.com/library/ios/#samplecode/Reachability/Listings/Classes_ReachabilityAppDelegate_m.html#//apple_ref/doc/uid/DTS40007324-Classes_ReachabilityAppDelegate_m-DontLinkElementID_4

I hope that will be helpful,if you need to ask something, put it in the comment and I'll edit my answer.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top