use apple Reachability source code in your project.
- copy "Reachability.h","Reachability.m" in your project directory.
- add "SystemConfiguration.farmework" in your build target.
- if you get some build error,read this link:http://stackoverflow.com/questions/10119239/adding-reachability-class-fails-when-i-am-trying-to-build