<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>BeefyApps Blog</title>
	
	<link>http://blog.beefyapps.com</link>
	<description>iPhone and iPod touch App Development News</description>
	<lastBuildDate>Thu, 08 Jul 2010 04:07:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BeefyappsBlog" /><feedburner:info uri="beefyappsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>UITextView Scrolling Doesn’t Work</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/hRSYzeV9ndY/</link>
		<comments>http://blog.beefyapps.com/2010/07/uitextview-scrolling-doesnt-work/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 04:03:15 +0000</pubDate>
		<dc:creator>jrickard</dc:creator>
				<category><![CDATA[Development Tips]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[UIImageView]]></category>
		<category><![CDATA[UITextView]]></category>
		<category><![CDATA[userInteractionEnabled]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=321</guid>
		<description><![CDATA[I had an issue where I was unable to get scrolling on a UITextView to work when editing was turned off. I searched and searched through the vast sea of information that is the internet and came up empty. Basically the problem was that I had nested my UITextView inside of a UIImageView. This seems [...]]]></description>
			<content:encoded><![CDATA[<p>I had an issue where I was unable to get scrolling on a UITextView to work when editing was turned off.  I searched and searched through the vast sea of information that is the internet and came up empty.</p>
<p>Basically the problem was that I had nested my UITextView inside of a UIImageView.  This seems innocuous enough but UIImageView does not have the userInteractionEnabled flag set to YES by default.  Therefore the event was dispatched up to that view from the main thread and was blocked because the view would not handle and propagate the event.</p>
<p>So the solution was to set the UIImageView&#8217;s userInteractionEnabled flag to YES.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p321code2'); return false;">View Code</a> OBJ-C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3212"><td class="code" id="p321code2"><pre class="obj-c" style="font-family:monospace;">    self.userInteractionEnabled = YES;</pre></td></tr></table></div>

<p>I think there could be other views that are set up like this as well, although I am not sure which ones they would be.  So watch out for this, especially if you are defining your views in code.</p>
<p>I hope that this shows up in someone&#8217;s Google search and helps them out.</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/hRSYzeV9ndY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2010/07/uitextview-scrolling-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2010/07/uitextview-scrolling-doesnt-work/</feedburner:origLink></item>
		<item>
		<title>Custom Fonts in iOS 4</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/mbgiSCJ1rxs/</link>
		<comments>http://blog.beefyapps.com/2010/06/custom-fonts-in-ios-4/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 01:21:50 +0000</pubDate>
		<dc:creator>Sanjeev</dc:creator>
				<category><![CDATA[Development Tips]]></category>
		<category><![CDATA[Custom Fonts]]></category>
		<category><![CDATA[iOS 4]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[UITextView]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=316</guid>
		<description><![CDATA[Up till now there hasn&#8217;t been an easy way to add custom fonts to your iPhone applications.  As of iOS 4 it has become very easy to do.  Here is what you need to do in order to add custom fonts: Add your custom font files into your project using XCode as a resource Add [...]]]></description>
			<content:encoded><![CDATA[<p>Up till now there hasn&#8217;t been an easy way to add custom fonts to your iPhone applications.  As of iOS 4 it has become very easy to do.  Here is what you need to do in order to add custom fonts:</p>
<ol>
<li>Add your custom font files into your project using XCode as a resource</li>
<li>Add a key to your info.plist file called UIAppFonts.</li>
<li>Make this key an array</li>
<li>For each font you have, enter the full name of your font file (including the extension) as items to the UIAppFonts array</li>
<li>Save info.plist</li>
<li>Now in your application you can simply call [UIFont fontWithName:@"CustomFontName" size:12] to get the custom font to use with your UILabels and UITextViews, etc&#8230;</li>
</ol>
<p>It&#8217;s that simple!</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/mbgiSCJ1rxs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2010/06/custom-fonts-in-ios-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2010/06/custom-fonts-in-ios-4/</feedburner:origLink></item>
		<item>
		<title>CoreData SQLite3 Database Constraint Failed Error</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/jgqpiFaRW7I/</link>
		<comments>http://blog.beefyapps.com/2010/03/coredata-sqlite3-database-constraint-failed-error/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 16:45:09 +0000</pubDate>
		<dc:creator>jrickard</dc:creator>
				<category><![CDATA[Development Tips]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[CoreData]]></category>
		<category><![CDATA[Error 256]]></category>
		<category><![CDATA[NSPersistenceStore]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=307</guid>
		<description><![CDATA[Have you ever seen the following error message: Error Domain=NSCocoaErrorDomain Code=256 UserInfo=0x3baae90 "Operation could not be completed. (Cocoa error 256.) Talk about not Helpful. Inside this there was a userInfo dictionary with the following message: error during SQL execution : constraint failed Slightly more helpful, but not by very much. We came across this error [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever seen the following error message:</p>
<p><code>Error Domain=NSCocoaErrorDomain Code=256 UserInfo=0x3baae90 "Operation could not be completed. (Cocoa error 256.)</code></p>
<p>Talk about not Helpful.</p>
<p>Inside this there was a userInfo dictionary with the following message: </p>
<p><code>error during SQL execution : constraint failed</code></p>
<p>Slightly more helpful, but not by very much.</p>
<p>We came across this error message while we were developing our <a href="http://www.beefyapps.com/electrophobe/info">Electrophobe</a> game.  We started the debugging process by inserting logging code and pinpointing where the code was failing out.  After about 6 hours of work combing through both code and rebuilt databases we finally found the solution.</p>
<p>The trick was that the primary key store for the SQLite3 database that was backing our CoreData NSPersistenceStore had an incorrect value for the Z_MAX column.  This column is used, we believe, to house the maximum primary key in order to quickly retrieve it for additional inserts.</p>
<p>As is evident from our escapade however, it is clearly a little vulnerable to tampering when loading the data directly into the SQLite database.  To fix the issue, simply update the table with the max(Z_ID) from the referenced table and it should all hook up again.</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/jgqpiFaRW7I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2010/03/coredata-sqlite3-database-constraint-failed-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2010/03/coredata-sqlite3-database-constraint-failed-error/</feedburner:origLink></item>
		<item>
		<title>Posting Multiple Files With ASI</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/_xHwB6QFg9Y/</link>
		<comments>http://blog.beefyapps.com/2010/02/posting-multiple-files-with-asi/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 03:00:08 +0000</pubDate>
		<dc:creator>jrickard</dc:creator>
				<category><![CDATA[Development Tips]]></category>
		<category><![CDATA[ASI]]></category>
		<category><![CDATA[ASIFormDataRequest]]></category>
		<category><![CDATA[Binary Data]]></category>
		<category><![CDATA[Post Request]]></category>
		<category><![CDATA[Sending Files]]></category>
		<category><![CDATA[Web Integration]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=297</guid>
		<description><![CDATA[How to modify ASI to support the post of multiple data objects]]></description>
			<content:encoded><![CDATA[<p>ASI (from <a href="http://allseeing-i.com/">All-Seeing Interactive</a>)  is a great product.  Apple has made strides to incorporate some of the advanced procedures that this allows for, but ASI gives you some great features to easily handle some more complicated operations.  It will allow you to easily download multiple files at once and aggregate the progress monitoring of these; It allowed for upload progress monitoring, before apple wired up its NSConnection objects for this purpose and many other features.  Having said that I have run across a couple of scenarios and extensions to the basic code that I have found useful.</p>
<p>First I had the need to post multiple files in the same post request up to a web server.  The ASI stack has a basic method for attaching an NSData object to your request data.  This method simply takes in the data and assigns it &#8220;filename&#8221; as the default filename for the data that is passed in.  Realistically there is no way for ASIFormDataRequest to infer the filename from the binary data.  However, this can be quite useful when you are posting binary file data to a web service as the web service is often looking for unique filename identification of each binary part of the posted multipart-form request.</p>
<p>In order to enhance the ASIFormDataRequest to handle this scenario we simply modified the setData: forKey: method to have an override that sets the filename property.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p297code3'); return false;">View Code</a> OBJECTIVE-C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2973"><td class="code" id="p297code3"><pre class="objective-c" style="font-family:monospace;">- (void)setData:(NSData *)data forKey:(NSString *)key
{
	[self setData:data forKey:key withFilename:@&quot;file&quot;];
}
&nbsp;
- (void)setData:(NSData *)data forKey:(NSString *)key withFilename:(NSString *)filename
{
	if (!fileData) {
		fileData = [[NSMutableDictionary alloc] init];
	}
	NSMutableDictionary *file = [[[NSMutableDictionary alloc] init] autorelease];
	[file setObject:data forKey:@&quot;data&quot;];
	[file setObject:filename forKey:@&quot;filename&quot;];
	[fileData setValue:file forKey:key];
	[self setRequestMethod:@&quot;POST&quot;];
}</pre></td></tr></table></div>

<p>By adding the override on the method we have maintained the core functionality and extended it to allow for multiple files with multiple file names.</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/_xHwB6QFg9Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2010/02/posting-multiple-files-with-asi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2010/02/posting-multiple-files-with-asi/</feedburner:origLink></item>
		<item>
		<title>Simple Ruby OAuth with Twitter</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/Bcr9t1XHnhA/</link>
		<comments>http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 21:54:52 +0000</pubDate>
		<dc:creator>wdevauld</dc:creator>
				<category><![CDATA[Development Tips]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Simple]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=275</guid>
		<description><![CDATA[We&#8217;ve been working on creating a website that would access resources within the cloud, and decided on adopting OAuth as an enabler. The difficulty was in finding a concise and simple example on how to do just that. Everywhere people had fully integrated rails models, controllers and libraries, or complicated explanations with gaps in the [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been working on creating a website that would access resources within <em>the cloud</em>, and decided on adopting <a href="http://oauth.net/">OAuth</a> as an enabler.  The difficulty was in finding a concise and simple example on how to do just that.  Everywhere people had fully integrated rails models, controllers and libraries, or complicated explanations with gaps in the code provided.</p>
<p>To fix the problem, we&#8217;ve come up with a very simple OAuth example using the <a href="http://twitter.com/apps">Twitter Provider</a>.  You&#8217;ll need the oauth gem for this to work:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://blog.beefyapps.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=275&amp;download=oauth_twitter_sample.rb">oauth_twitter_sample.rb</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2755"><td class="code" id="p275code5"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'oauth'</span>
&nbsp;
consumer = <span style="color:#6666ff; font-weight:bold;">OAuth::Consumer</span>.<span style="color:#9900CC;">new</span> <span style="color:#996600;">&quot;twitter_provided_consumer_key&quot;</span>,
                     <span style="color:#996600;">&quot;twitter_provided_secret_key&quot;</span>,
                      <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:site</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'http://twitter.com/'</span>,
                        <span style="color:#ff3333; font-weight:bold;">:request_token_path</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/oauth/request_token'</span>,
                        <span style="color:#ff3333; font-weight:bold;">:access_token_path</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/oauth/access_token'</span>,
                        <span style="color:#ff3333; font-weight:bold;">:authorize_path</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/oauth/authorize'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
request_token = consumer.<span style="color:#9900CC;">get_request_token</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Place <span style="color:#000099;">\&quot;</span>#{request_token.authorize_url}<span style="color:#000099;">\&quot;</span> in your browser&quot;</span>
<span style="color:#CC0066; font-weight:bold;">print</span> <span style="color:#996600;">&quot;Enter the number they give you: &quot;</span>
pin = STDIN.<span style="color:#CC0066; font-weight:bold;">readline</span>.<span style="color:#CC0066; font-weight:bold;">chomp</span>
&nbsp;
access_token = request_token.<span style="color:#9900CC;">get_access_token</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:oauth_verifier</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> pin<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">puts</span> access_token.<span style="color:#9900CC;">get</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'/account/verify_credentials.json'</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></td></tr></table></div>

<p>As you can see, the OAuth gem deals with most of the dirty work, as a matter of fact, almost half of the example file is environment, dependencies and user interaction.  There is really only three lines that have any real use.</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/Bcr9t1XHnhA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/</feedburner:origLink></item>
		<item>
		<title>Drums ft. Dubya on BeefyBoard, the iPhone SoundBoard</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/7_tw0c0PhIk/</link>
		<comments>http://blog.beefyapps.com/2009/11/drums-ft-dubya-on-beefyboard-the-iphone-soundboard/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 07:18:49 +0000</pubDate>
		<dc:creator>wdevauld</dc:creator>
				<category><![CDATA[BeefyBoard: The iPhone Soundboard]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=269</guid>
		<description><![CDATA[The boys put on a show with the BeefyBoard.]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ZMsYLk7EP_o&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZMsYLk7EP_o&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
<p>The boys put on a show with the BeefyBoard.</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/7_tw0c0PhIk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2009/11/drums-ft-dubya-on-beefyboard-the-iphone-soundboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2009/11/drums-ft-dubya-on-beefyboard-the-iphone-soundboard/</feedburner:origLink></item>
		<item>
		<title>Deploying a Read/Write Resources with your iPhone Application</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/m16MbCBJKrQ/</link>
		<comments>http://blog.beefyapps.com/2009/10/deploying-a-readwrite-resources-with-your-iphone-application/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 20:50:53 +0000</pubDate>
		<dc:creator>jrickard</dc:creator>
				<category><![CDATA[Development Tips]]></category>
		<category><![CDATA[beefyboard]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[Documents]]></category>
		<category><![CDATA[dynamic data]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=255</guid>
		<description><![CDATA[iPhone development has been a great experience but that does not mean it has not been without its challenges. For instance, if you are planning on saving some sort of dynamic content in your application, you will quickly find that it is not simply a matter of discovering where your application is being stored and [...]]]></description>
			<content:encoded><![CDATA[<p>iPhone development has been a great experience but that does not mean it has not been without its challenges.  For instance, if you are planning on saving some sort of dynamic content in your application, you will quickly find that it is not simply a matter of discovering where your application is being stored and writing some files in there.  It is a little bit more involved than that.  In order to help those who come after, we thought it would be worthwhile to share some of our findings.</p>
<p>I think the first thing to realize is that when your application is deployed onto your iPhone/iPod/Simulator you are deploying a complete package.  This means that the contents, i.e your code, resources, database and anything else that might be part of your deployment bundle are uniquely signed using your developer&#8217;s key which verifies that everything you intended to be in there is there and nothing else.  This is a very important concept from a security standpoint and it allows the target device to verify the validity of the bundle to ensure that your application has not been compromised.  Now that we have stated that, it&#8217;s pretty obvious that it will be impossible to change the deployed project.  This doesn&#8217;t mean that Apple didn&#8217;t think of this inevitability.</p>
<p>The first step to looking into this deployment will be looking at the target deployed file system.  The easy way to find this is to log the applications bundle path in the applicationDidFinishLoading method on the appDelegate.  You can do this with the following code:</p>
<div class="codeexample">NSLog(@&#8221;Application Directory: %@&#8221;, NSHomeDirectory());</div>
<p>The output (in the console) for this will show you where you can find the file system.  I usually just copy and paste this into a terminal window and jump right to it (just make sure to wrap the directory name in double quotation marks).</p>
<p>If you navigate tot this directory you will see your application (yourapp.app) which is a directory containing all of your code and resources and a Documents and a Library directory.  That Documents directory is where our dynamic content will reside.</p>
<p>This seems straightforward enough, just put what we need in the directory and away we go, right?  Well not so quick cowboy, there is no idea of an installer that executes when your application downloads.  This means we are going to have to figure out how to copy the files into the Documents directory the first time the application loads.</p>
<p>Over here at BeefyApps, we developed this little snippet of code to handle this initial load of data.</p>
<div class="codeexample">-(void)initializeDocumentDirectory<br />
{</p>
<div style="position: relative; left: 20px;">NSFileManager *manager = [NSFileManager defaultManager];<br />
NSArray *templateDir = [manager directoryContentsAtPath:[NSString stringWithFormat:@"%@/Documents", [[NSBundle mainBundle] bundlePath]]];</p>
<p>for (id file in templateDir) {</p>
<div style="position: relative; left: 20px;">if ([manager fileExistsAtPath:[NSString stringWithFormat:@"%@/Documents/%@", NSHomeDirectory(), file]])</p>
<div style="position: relative; left: 20px;">continue;</div>
<p>NSString *srcPath = [NSString stringWithFormat:@"%@/Documents/%@", [[NSBundle mainBundle] bundlePath], file];<br />
NSString *dstPath = [NSString stringWithFormat:@"%@/Documents/%@", NSHomeDirectory(), file];</p>
<p>NSError *error;<br />
[manager copyItemAtPath:srcPath toPath:dstPath error:&amp;error];</p></div>
<p>}</p></div>
<p>}</p></div>
<p>So the code above simply takes a look inside of the bundle, navigated to via the [[NSBundle mainBundle] bundlePath] command.  The result of this call will provide you with the string location of the applications executing bundle directory.  For the purposes of this code we have a Documents directory which resides inside of the bundle path.  We then take the contents of that directory and conditionally copy it file by file into the writable Documents directory.</p>
<p>Pretty simple solution really.  I think where this gets interesting is when we start to consider the ramifications for updating your application.  I&#8217;ll leave that exercise up to the reader at this time though.</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/m16MbCBJKrQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2009/10/deploying-a-readwrite-resources-with-your-iphone-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2009/10/deploying-a-readwrite-resources-with-your-iphone-application/</feedburner:origLink></item>
		<item>
		<title>iPhone 3.0.1 Update Breaks SDK</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/2xmYvSqTt-w/</link>
		<comments>http://blog.beefyapps.com/2009/08/iphone-301-update-breaks-sdk/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 16:35:43 +0000</pubDate>
		<dc:creator>jrickard</dc:creator>
				<category><![CDATA[Development Tips]]></category>
		<category><![CDATA[iPhone SDK development 3.0.1]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=250</guid>
		<description><![CDATA[The title here is a little inflammatory but the solution is quite simple and if we all just read the instructions before installing stuff then maybe we could avoid these problems. But just in case someone else runs across this problem the solution is to run the following command (as indicated by apple in their [...]]]></description>
			<content:encoded><![CDATA[<p>The title here is a little inflammatory but the solution is quite simple and if we all just read the instructions before installing stuff then maybe we could avoid these problems.  But just in case someone else runs across this problem the solution is to run the following command (as indicated by apple in their release notes):</p>
<div class="codeexample">
ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0\ \<br />
\(7A341\)/ /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1
</div>
<p>This does assume that you are using the default paths.</p>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/2xmYvSqTt-w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2009/08/iphone-301-update-breaks-sdk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2009/08/iphone-301-update-breaks-sdk/</feedburner:origLink></item>
		<item>
		<title>Upcoming: New iPhone Game</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/QzNuhJaaA70/</link>
		<comments>http://blog.beefyapps.com/2009/07/upcoming-new-iphone-game/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 05:22:11 +0000</pubDate>
		<dc:creator>wdevauld</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Electrophobe]]></category>
		<category><![CDATA[Alpha]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Screenshot]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=241</guid>
		<description><![CDATA[We at BeefyApps have not been idle since the 1.1 release of our iPhone Soundboard.  A new project has been underway, this time with a little more focus on skill and competitiveness.  Finishing touches are being done on a  recreational pursuit of high scores that can be shown off to your friends.  A little sneak [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">We at BeefyApps have not been idle since the <a href="http://blog.beefyapps.com/2009/06/beefyboard-iphone-soundboard-ready-for-iphone-os-30/">1.1 release of our iPhone Soundboard</a>.  A new project has been underway, this time with a little more focus on skill and competitiveness.  Finishing touches are being done on a  recreational pursuit of high scores that can be shown off to your friends.  A little sneak peak of an early alpha build:</p>
<div class="mceTemp" style="text-align: center;">
<dl id="attachment_242" class="wp-caption alignnone" style="width: 330px;">
<dt class="wp-caption-dt" style="text-align: center;"><img class="size-full wp-image-242" title="Electrophobe for the iPhone" src="http://blog.beefyapps.com/wp-content/uploads/2009/07/electrophone_for_the_iphone.png" alt="Electrophobe for the iPhone" width="320" height="479" /></dt>
<dd class="wp-caption-dd" style="text-align: center;">Electrophobe for the iPhone</dd>
</dl>
</div>
<p>We are most electrified about the features that you can&#8217;t see in the screenshot.</p>
<p style="text-align: center;">
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/QzNuhJaaA70" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2009/07/upcoming-new-iphone-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2009/07/upcoming-new-iphone-game/</feedburner:origLink></item>
		<item>
		<title>BeefyBoard: iPhone Soundboard Ready For iPhone OS 3.0</title>
		<link>http://feedproxy.google.com/~r/BeefyappsBlog/~3/tkWSw1Cjjnw/</link>
		<comments>http://blog.beefyapps.com/2009/06/beefyboard-iphone-soundboard-ready-for-iphone-os-30/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 23:28:01 +0000</pubDate>
		<dc:creator>Sanjeev</dc:creator>
				<category><![CDATA[BeefyBoard: The iPhone Soundboard]]></category>
		<category><![CDATA[beefyboard]]></category>
		<category><![CDATA[iPhone OS 3.0]]></category>
		<category><![CDATA[iPhone soundboard]]></category>

		<guid isPermaLink="false">http://blog.beefyapps.com/?p=233</guid>
		<description><![CDATA[With the new iPhone OS 3.0 being released today, we here at BeefyApps have been busy updating BeefyBoard: iPhone Soundboard for use with OS 3.0. We’ve found that some of the sound features that worked in OS 2.2.1 were no longer compatible with OS 3.0, specifically recording a sound to the phone and then switching [...]]]></description>
			<content:encoded><![CDATA[<p>With the new iPhone OS 3.0 being released today, we here at BeefyApps have been busy updating BeefyBoard: iPhone Soundboard for use with OS 3.0.  We’ve found that some of the sound features that worked in OS 2.2.1 were no longer compatible with OS 3.0, specifically recording a sound to the phone and then switching back to playback.</p>
<p>With a little bit of work we’ve fixed these problems and have submitted the new app for approval.   The new version should be available to download early next week if the approval process goes smoothly.  We’ve also taken the opportunity to add more features to BeefyBoard that will make it the best iPhone Soundboard out there.</p>
<p>What this means to existing users of BeefyBoard and those that purchase it within the next few days is that if you upgrade to OS 3.0, some of the functionality of the app will be broken until you update to the new version of BeefyBoard (when it becomes available on iTunes).</p>
<p>New Features in Version 1.1</p>
<ul>
<li> Added Board Ratings</li>
<li> Added Board Comments</li>
<li> Added Skin Ratings</li>
<li> Added Skin Comments</li>
<li> Added Skin Affinity</li>
<li> Added Settings Controls
<ul>
<li> Enable/Disable skin affinity</li>
<li> Shake sensitivity</li>
</ul>
</li>
<li> Added Upload Progress Bar</li>
<li> Stop Recording By Pressing Any Button</li>
<li> OS 3.0 Compatibility fixes</li>
</ul>
<img src="http://feeds.feedburner.com/~r/BeefyappsBlog/~4/tkWSw1Cjjnw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.beefyapps.com/2009/06/beefyboard-iphone-soundboard-ready-for-iphone-os-30/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.beefyapps.com/2009/06/beefyboard-iphone-soundboard-ready-for-iphone-os-30/</feedburner:origLink></item>
	</channel>
</rss>
