<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>#iPhoneDev &#187; edge</title>
	<atom:link href="http://iphone.keyvisuals.com/tag/edge/feed/" rel="self" type="application/rss+xml" />
	<link>http://iphone.keyvisuals.com</link>
	<description>Because Corporate Jobs Suck.</description>
	<lastBuildDate>Fri, 13 Jan 2012 07:26:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Detect Network Availability in apps</title>
		<link>http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/</link>
		<comments>http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/#comments</comments>
		<pubDate>Fri, 08 May 2009 16:18:12 +0000</pubDate>
		<dc:creator>keyvisuals</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[Keyvisuals]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[3g]]></category>
		<category><![CDATA[edge]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[reachability]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://iphone.keyvisuals.com/?p=338</guid>
		<description><![CDATA[** UPDATE 11/12/09 : BOTH my wifi &#38; network connection detection apps are WORKING Again! ** If you write an app that depends on internet access in order to function properly Apple requires that you detect the state of the connection and report it to the user when that connection is unavailable. If you do [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="color: #ff0000;"><span style="color: #000000;">** </span><span style="color: #339966;">UPDATE 11/12/09 </span></span>: BOTH my wifi &amp; network connection detection apps are WORKING Again! **<br />
</strong></p>
<p>If you write an app that depends on internet access in order to function properly Apple requires that you detect the state of the connection and report it to the user when that connection is unavailable. If you do not Apple will reject your app on the basis that it is confusing to the user. Confusing because the app does not work and Apple assumes that the user will not understand why. Makes sense.</p>
<p>Here is one way to determine whether or not the users device has airplane mode enabled . . .</p>
<ol>
<li>Add <strong>SBUsesNetwork </strong>to the <strong>Info.plist </strong></li>
<li>Change its type to<strong> Boolean</strong></li>
<li>Add a check mark to enable</li>
</ol>
<p>Here is handy little project that detects whether or not your application has access to a WiFi network:</p>
<p><span style="color: #339966;"><a href="http://iphone.keyvisuals.com/downloads/TestWifi_3.0.zip"><strong>Download TestWifi_3.0.zip</strong></a></span></p>
<p>Here is another handy little project that detects whether or not your application has any network access:</p>
<p><a href="http://iphone.keyvisuals.com/downloads/NetConnectDetect_3.0.zip"><strong>Download NetConnectDetection_3.0.zip</strong></a><span style="text-decoration: line-through;"><a href="http://iphone.keyvisuals.com/downloads/NetConnectDetection.zip"><strong><br />
</strong></a></span></p>
<p>Feel free to use any of the above code in any way you wish. I am providing it in the hopes that it will help save someone from the headache that I experienced all day yesterday trying to get network detection to work <img src='http://iphone.keyvisuals.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>If you find any errors or corrections please notify me and I will update the sample apps. Thanks!</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=219&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+Detect+Network+Availability+in+apps&amp;link=http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/&amp;notes=%2A%2A%20UPDATE%2011%2F12%2F09%20%3A%20BOTH%20my%20wifi%20%26amp%3B%20network%20connection%20detection%20apps%20are%20WORKING%20Again%21%20%2A%2A%0D%0A%0D%0A%0D%0AIf%20you%20write%20an%20app%20that%20depends%20on%20internet%20access%20in%20order%20to%20function%20properly%20Apple%20requires%20that%20you%20detect%20the%20state%20of%20the%20connection%20and%20report%20it%20to%20the%20user%20when%20that%20connection%20is%20unavaila&amp;short_link=&amp;shortener=none&amp;shortener_key=&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://iphone.keyvisuals.com/code-snippets/how-to-detect-network-availability-in-apps/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

