- Home /
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
Answer by Eric5h5 · Apr 07, 2010 at 08:12 PM
Use iPhoneSettings.internetReachability
.
does this work still??? because it returns not conencted even though i can connect to internet from safari!!!
Answer by touchgamedev · Apr 14, 2010 at 07:38 PM
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.
Your answer
Follow this Question
Related Questions
Using LoadFromCacheOrDownload causes iOS to freeze/stall 3 Answers
Image-based Level Generator having problems 0 Answers
Bump API for Unity 4 0 Answers
Why can Android send commands via NetworkManager but iOS cannot? 0 Answers
Unhandled Exception: Mono.Linker.ResolutionException: Can not resolve reference 0 Answers