<?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; error</title>
	<atom:link href="http://iphone.keyvisuals.com/tag/error/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>FIXED: stringWithContentsOfFile is Deprecated Error</title>
		<link>http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/</link>
		<comments>http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 19:02:13 +0000</pubDate>
		<dc:creator>keyvisuals</dc:creator>
				<category><![CDATA[Apps]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[deprecated]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fixed]]></category>

		<guid isPermaLink="false">http://iphone.keyvisuals.com/?p=546</guid>
		<description><![CDATA[Now that I&#8217;ve started working with the latest and greatest iPhone SDK I&#8217;m running into a bunch of deprecated method errors. It&#8217;s recommended practice to treat warnings the same as errors so I have been trying to fix them as they pop up. The one in particular that was giving me trouble today was: NSString [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve started working  with the latest and greatest iPhone SDK I&#8217;m running into a bunch of deprecated method errors. It&#8217;s recommended practice to treat warnings the same as errors so I have been trying to fix them as they pop up. The one in particular that was giving me trouble today was:</p>
<p><span style="color: #000000;"><strong>NSString *contents = [NSString stringWithContentsOfFile:fullpath];</strong></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">After doing a bit of Googling I found the solution. </span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">Replace </span></span><span style="color: #ff0000;">NSString *contents = [NSString stringWithContentsOfFile:fullpath];<span style="color: #000000;"> with:</span></span></p>
<p><span style="color: #000000;"><strong> NSString *contents = [NSString stringWithContentsOfFile:fullpath encoding:NSUTF8StringEncoding error:nil];[NSString stringWithContentsOfFile:fullpath encoding:NSUTF8StringEncoding error:nil];</strong></span></p>
<p><span style="color: #000000;"><strong><br />
</strong></span></p>
<p><span style="color: #000000;">(Side Note: Ever since I began coding my vocabulary has expanded. Now I get to use words like <em>Redacted</em> and <em>Deprecated <img src='http://iphone.keyvisuals.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  </em>Thanks Apple!<em>)</em><strong><br />
</strong></span></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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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=FIXED%3A+stringWithContentsOfFile+is+Deprecated+Error&amp;link=http://iphone.keyvisuals.com/apps/fixed-stringwithcontentsoffile-is-deprecated-error/&amp;notes=Now%20that%20I%27ve%20started%20working%20%20with%20the%20latest%20and%20greatest%20iPhone%20SDK%20I%27m%20running%20into%20a%20bunch%20of%20deprecated%20method%20errors.%20It%27s%20recommended%20practice%20to%20treat%20warnings%20the%20same%20as%20errors%20so%20I%20have%20been%20trying%20to%20fix%20them%20as%20they%20pop%20up.%20The%20one%20in%20particular%20that%20was%20giving%20me%20trouble%20today%20was%3A%0D%0A%0D&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/apps/fixed-stringwithcontentsoffile-is-deprecated-error/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

