Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
603 views
in Technique[技术] by (71.8m points)

iphone - Are there more sophisticated alternatives to Apples Reachability class?

Apple has created that famous Reachability class but looking at the code I don't trust it much. The formatting and header is messy.

Also it provides no help for showing that "You have no internet!" alert.

I just want to do:

  • At some point download a XML.

  • When there is no internet, show alert.

  • When internet disconnects while downloading the XML, show alert.

In my app the user taps no download button it all happens automatically in the background.

That's it. Really. I spent now 3 hours with Reachability my brain just rejects it.

Did someone create a clever alternative with a clean header and clean code? Something that is really simple to use?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've found one on GitHub: https://github.com/tonymillion/Reachability

Note: First find != necessarily best find.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...