Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 10, 2008, 06:57 PM   #1
imho
macrumors newbie
 
Join Date: Jul 2008
Detect network type change automatically.

Is it possible to detect network type switching (e.g WIFI to 3G) automatically with say a callback or something?

I checked the Reachability sample, it doesn't really do that at all. The only other way i could think of is to constantly poll the network type which i'm sure is a pretty dumb and inefficient solution.

Thanks.
imho is offline   0 Reply With Quote
Old Nov 11, 2008, 03:17 AM   #2
robbieduncan
Demi-God (Moderator)
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Quote:
Originally Posted by imho View Post
I checked the Reachability sample, it doesn't really do that at all. The only other way i could think of is to constantly poll the network type which i'm sure is a pretty dumb and inefficient solution.
Really? I thought it did. I'm not on a Mac to check right now...
robbieduncan is offline   0 Reply With Quote
Old Nov 11, 2008, 07:09 AM   #3
jnic
macrumors 6502a
 
Join Date: Oct 2008
Location: Cambridge
Quote:
Originally Posted by robbieduncan View Post
Really? I thought it did. I'm not on a Mac to check right now...
It does, here's a link to the Readme: http://developer.apple.com/iphone/li.../listing6.html.

"ReachableViaWiFiNetwork" and "ReachableViaCarrierDataNetwork" tell you whether you're running over Wifi or 3G respectively.
jnic is offline   0 Reply With Quote
Old Nov 11, 2008, 07:12 AM   #4
robbieduncan
Demi-God (Moderator)
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Quote:
Originally Posted by jnic View Post
It does, here's a link to the Readme: http://developer.apple.com/iphone/li.../listing6.html.

"ReachableViaWiFiNetwork" and "ReachableViaCarrierDataNetwork" tell you whether you're running over Wifi or 3G respectively.
Thought so, although this might have been a better quote from the readme

Quote:
Reachability runs asynchronously and will report back changes to the network state and to the reachability of remote hosts as those changes happen.
robbieduncan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Why can't my MacBook automatically detect network location sammy.d MacBook 6 Aug 15, 2012 03:30 AM
airport suddenly not detecting ANY networks reblevitan MacBook Pro 3 Jan 13, 2011 11:22 PM
I need a Cheat/Way to type A-Z automatically? ItDoesntMatter Mac Basics and Help 8 Aug 17, 2009 09:19 PM
Detecting network path ithil Mac Programming 3 Jul 8, 2006 12:20 AM
Airport Card won't detect networks esternullo Mac Pro 2 Mar 5, 2006 10:44 AM


All times are GMT -5. The time now is 04:22 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC