Network Functionality for iOS added

Copied over code to support network check before user searches in the
iOS app.