1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

How to test for any internet connection? 3g wi-fi edge

Discussion in 'iPhone/iPad Programming' started by springframework, Sep 2, 2008.

  1. macrumors member

    #1
    Is there simple quick and easy ... lets say 1-3 lines of code to test for an internet connection on the iphone?

    or even better would be to have a function triggered right when internet connection is made, and right when it is disconnected.


    also feel free to post more complex ways if no easy ways exist.
     
  2. Moderator

    robbieduncan

    Staff Member

    #2
    Look at the Reachability sample.
     

Share This Page