<?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>farp.blog &#187; framework</title>
	<atom:link href="http://fredandrandall.com/blog/tag/framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://fredandrandall.com/blog</link>
	<description>Bloggin&#039; about whatever</description>
	<lastBuildDate>Tue, 04 Nov 2014 07:15:30 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.38</generator>
	<item>
		<title>Introducing: HappyCampfire, a Campfire framework for OS X and iOS</title>
		<link>http://fredandrandall.com/blog/2011/10/02/introducing-happycampfire-a-campfire-framework-for-os-x-and-ios/</link>
		<comments>http://fredandrandall.com/blog/2011/10/02/introducing-happycampfire-a-campfire-framework-for-os-x-and-ios/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 02:04:26 +0000</pubDate>
		<dc:creator><![CDATA[Randall]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[happycampfire]]></category>
		<category><![CDATA[happycampr]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://fredandrandall.com/blog/?p=548</guid>
		<description><![CDATA[One of my favorite tools that I use at work is Campfire. If you haven&#8217;t heard of Campfire, it&#8217;s a group chat web app built by 37 signals. It&#8217;s very easy to use and has some fun features. One day &#8230; <a href="http://fredandrandall.com/blog/2011/10/02/introducing-happycampfire-a-campfire-framework-for-os-x-and-ios/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://fredandrandall.com/blog/wp-content/uploads/2011/10/campfirelogo.png"><img class="alignleft size-medium wp-image-609" title="campfirelogo" src="http://fredandrandall.com/blog/wp-content/uploads/2011/10/campfirelogo-300x248.png" alt="" width="300" height="248" /></a>One of my favorite tools that I use at work is <a href="http://campfirenow.com/">Campfire</a>. If you haven&#8217;t heard of Campfire, it&#8217;s a group chat web app built by 37 signals. It&#8217;s very easy to use and has some fun features. One day I started playing around with the Campfire API to see what could be done and from that came the app I&#8217;m working on called HappyCampr. From that app, came the framework HappyCampfire.</p>
<p><a href="https://github.com/blladnar/HappyCamprFramework">HappyCampfire</a> is an objective-c wrapper around most of the Campfire API. It has model objects like users, messages, and rooms. It should allow anyone familiar with Cocoa programming to get right to work on using the Campfire API. It is designed to work on both OS X and iOS but most of the work/testing has been on OS X.</p>
<p>I wanted to put this out there to help people make good innovative uses of Campfire, without having to deal with too many of the nitty gritty details. It&#8217;s definitely still a bit of a work in progress so feel free to fork it and send me a pull request if want to fix/add anything.<span id="more-548"></span></p>
<p>The framework is designed to be asynchronous and uses <a href="http://allseeing-i.com/ASIHTTPRequest/">ASIHTTPRequest</a> for the network communication. It also allows you to make use of Campfire&#8217;s streaming API to get message updates. The project includes a test app for OS X that will let you test all of the different parts of the framework.</p>
<p>To get started you&#8217;ll create an object like this</p>
<pre class="brush: objc; title: ; notranslate">
campfire = [[HappyCampfire alloc] initWithCampfireURL:@&quot;https://YOUR_CAMPFIRE_URL.campfirenow.com&quot;];
campfire.authToken = @&quot;YOUR_AUTH_TOKEN&quot;;

[campfire sendText:@&quot;Hello World&quot; toRoom:@&quot;ROOM_NUM&quot; completionHandler:^(HCMessage *message, NSError *error){

   NSLog(@&quot;%@&quot;, message);

}];
</pre>
<p>If you&#8217;re interested in using the streaming API that&#8217;s really easy too.</p>
<pre class="brush: objc; title: ; notranslate">

campfire.delegate = self;
[campfire startListeningForMessagesInRoom:@&quot;ROOM_NUMBER&quot;];

// Then you'll implement the CampfireResponseProtocol
-(void)messageReceived:(HCMessage *)message
{
   NSLog(@&quot;Message: %@&quot;, message);
}
</pre>
<p><a href="https://github.com/blladnar/HappyCamprFramework/">Check it out on GitHub</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fredandrandall.com/blog/2011/10/02/introducing-happycampfire-a-campfire-framework-for-os-x-and-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a custom cocoa framework</title>
		<link>http://fredandrandall.com/blog/2011/02/04/how-to-create-a-custom-cocoa-framework/</link>
		<comments>http://fredandrandall.com/blog/2011/02/04/how-to-create-a-custom-cocoa-framework/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 04:29:53 +0000</pubDate>
		<dc:creator><![CDATA[Randall]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[objc]]></category>
		<category><![CDATA[thoughtback]]></category>

		<guid isPermaLink="false">http://fredandrandall.com/blog/?p=238</guid>
		<description><![CDATA[I was recently trying to rip out some code from the Thoughtback app into it&#8217;s own framework so that I could eventually open source when we decide to make our API public. I&#8217;ve used frameworks plenty of times, but I&#8217;ve never &#8230; <a href="http://fredandrandall.com/blog/2011/02/04/how-to-create-a-custom-cocoa-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I was recently trying to rip out some code from the <a href="http://www.thoughtback.com">Thoughtback</a> app into it&#8217;s own framework so that I could eventually open source when we decide to make our API public. I&#8217;ve used frameworks plenty of times, but I&#8217;ve never actually made my own.</p>
<p>I started off by just using the default Cocoa Framework project that XCode makes for you. It all seemed to work just fine, but when I tried actually using the framework in a different project, it wouldn&#8217;t load. I kept getting this error</p>
<pre class="brush: plain; title: ; notranslate">Library not loaded: path/to/framework
 Referenced from: path/to/app/
 Reason: image not found</pre>
<p><span id="more-238"></span>After lots of looking around I finally figured out the problem. Frameworks can be referenced at the System level (requires admin rights to install), the User level (could be useful to share a framework between apps), and at the application level. Bundling your framework inside the application is the most common way to do that. The &#8220;image not found&#8221; error has to do with some pathing in the framework. To fix it, you&#8217;ll need to change the &#8220;Installation Directory&#8221; in the build settings of your framework. Right click on your framework&#8217;s target to bring up the info panel. Search for &#8220;Installation Directory&#8221; and set it to be <strong>@executable_path/../Frameworks</strong>.</p>
<p><a href="http://fredandrandall.com/blog/wp-content/uploads/2011/02/InstallationDirectory.png"><img class="aligncenter size-full wp-image-248" title="InstallationDirectory" src="http://fredandrandall.com/blog/wp-content/uploads/2011/02/InstallationDirectory.png" alt="" width="516" height="593" /></a></p>
<p>Now the framework should load just fine in any project you want to use it in. I still had a problem though. If you&#8217;re familiar with cocoa frameworks, you&#8217;ll know its just a bundle with a library and some header files in a certain directory structure. I looked at my framework and couldn&#8217;t find the &#8220;Headers&#8221; folder with my header files so I couldn&#8217;t use anything that was in my framework. I googled around for a little while and found nothing. Thats when I noticed the &#8220;Role&#8221; column when I clicked on my framework target. That let me set the header files to public, private, or project, depending on how I wanted them to show up in my framework.</p>
<p><a href="http://fredandrandall.com/blog/wp-content/uploads/2011/02/PublicHeader.png"><img class="aligncenter size-full wp-image-247" title="PublicHeader" src="http://fredandrandall.com/blog/wp-content/uploads/2011/02/PublicHeader.png" alt="" width="370" height="401" /></a></p>
<p>So now that I have the library path right and the header files right, there is just one thing I needed to do to get it working in my test app. You&#8217;ll need to add another build step to your application target that copies the framework to your application bundle.</p>
<ol>
<li>Right click on your application target.</li>
<li>Click &#8220;New Build Phase&#8221;</li>
<li>Click &#8220;New Copy Files Build Phase&#8221;</li>
<li>Change the destination to &#8220;Frameworks&#8221;</li>
<li>Close the window.</li>
<li>Drag and drop your framework into the build phase.</li>
</ol>
<p><object id="scPlayer" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="763" height="429" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/jingswfplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/FirstFrame.jpg&amp;containerwidth=763&amp;containerheight=429&amp;content=http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/00000074.swf&amp;blurover=false" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/" /><param name="src" value="http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/jingswfplayer.swf" /><param name="flashvars" value="thumb=http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/FirstFrame.jpg&amp;containerwidth=763&amp;containerheight=429&amp;content=http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/00000074.swf&amp;blurover=false" /><param name="allowfullscreen" value="true" /><embed id="scPlayer" type="application/x-shockwave-flash" width="763" height="429" src="http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/jingswfplayer.swf" base="http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/" allowscriptaccess="always" scale="showall" allowfullscreen="true" flashvars="thumb=http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/FirstFrame.jpg&amp;containerwidth=763&amp;containerheight=429&amp;content=http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/00000074.swf&amp;blurover=false" bgcolor="#FFFFFF" quality="high" data="http://content.screencast.com/users/lladnar/folders/Jing/media/33d932c2-955a-4b9b-841e-236f5ce936e8/jingswfplayer.swf"></embed></object></p>
<p>Hopefully you found this useful. I couldn&#8217;t find all of the resources I needed in one place and what I did find wasn&#8217;t detailed enough to solve my problem immediately. This <a href="http://www.cimgf.com/2008/09/04/cocoa-tutorial-creating-your-very-own-framework/">post</a> from Cocoa Is My Girlfriend got me most of the way there and has some more good information on the subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://fredandrandall.com/blog/2011/02/04/how-to-create-a-custom-cocoa-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
