How to know if the ipod touch or iphone is connected to internet?

Hello,

How could i check if the iPod touch or iPhone is connected to internet? I am using Unity iPhone Advanced and I want to check if there's a connection before using Facebook Connect.

Ideally, I would like to receive a boolean. If it is possible to get code, I prefer C#.

Thank you, Phil

Use `iPhoneSettings.internetReachability`.

Ideally you will need to do this on startup of the application and test this if your app will require internet connectivity and catch the exception - this is one reason apps get rejected by Apple. Take Unity out of the picture - if I code an app in xcode using the sdk and objective c and it requires connectivity but do not test for this or even specify in my marketing materials that connectivity is required Apple will reject the app. But this makes total sense and less headache for you in the long run.