<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title></title>
  <link href="http://iannopollo.com/atom.xml" rel="self"/>
  <link href="http://iannopollo.com/"/>
  <updated>2013-02-28T16:09:09-05:00</updated>
  <id>http://iannopollo.com/</id>
  <author>
    <name>Steve Iannopollo</name>
    
  </author>

  
  <entry>
    <title>Print and Paginate NSTableViews</title>
    <link href="http://iannopollo.com/blog/2012/11/03/print-and-paginate-nstableviews"/>
    <updated>2012-11-03T10:49:00-04:00</updated>
    <id>http://iannopollo.com/blog/2012/11/03/print-and-paginate-nstableviews</id>
    <content type="html">&lt;p&gt;I've been getting &lt;a href=&quot;/apps/mac/tick&quot;&gt;Tick&lt;/a&gt; ready for a new release, and one bug someone pointed out was that the invoice PDFs were generated as one long PDF. This works out fine until you need to &lt;em&gt;print it&lt;/em&gt;. Below is the code I used to fix that.&lt;/p&gt;

&lt;!--more--&gt;


&lt;p&gt;So like most things in Objective-C, if you want to add some interesting functionality to a class, you need to subclass it and use that class for your implementation (since categories don't allow you to add instance variables). Fine Cocoa, whatever. Anyway, here is the complete code to turn your dumb NSTableView into a printing and paginating machine!&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/4007554.js&quot;&gt; &lt;/script&gt;


&lt;p&gt;The reason this warrants a blog post is that I couldn't find a single spot that contained all this information. At first I thought that the NSTableView might just need some magic property set (like setAllowsMagicalPagination:YES), but alas, that doesn't exist. Then I thought the NSCells might be able to fix themselves, but they aren't in charge of drawing themselves (not being NSView subclasses), so that was out. Eventually I was able to squeeze enough vital information out of the internet that allowed me to split up the tables rows during printing, and that resulted in the above code.&lt;/p&gt;

&lt;p&gt;So consider this my civic duty for the day. Enjoy!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Clean Start on OS X Lion</title>
    <link href="http://iannopollo.com/blog/2012/01/16/clean-start-on-osx-lion"/>
    <updated>2012-01-16T18:13:00-05:00</updated>
    <id>http://iannopollo.com/blog/2012/01/16/clean-start-on-osx-lion</id>
    <content type="html">&lt;p&gt;I recently bought a new (to me) MacBook Pro with Lion installed. The previous owner hadn't had the time to completely wipe everything from the machine since I bought it 3 hours after I first responded to his Craigslist post. So, I found myself in need of starting completely fresh and Googled it. I found some disjointed posts in various Mac-related forums, but nothing that said &quot;This is how you do it&quot;. So, this is how you do it:&lt;/p&gt;

&lt;!--more--&gt;


&lt;ol&gt;
&lt;li&gt;Restart your Mac and hold down the Command-R. That will open up the &quot;Mac OS X Utilities&quot; app &lt;a href=&quot;http://www.apple.com/macosx/recovery/&quot;&gt;(seen here)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Select &quot;Disk Utility&quot; from the menu and proceed to erase the Macintosh HD drive. This completely wipes the Macintosh HD drive, so be really sure you want that to happen.&lt;/li&gt;
&lt;li&gt;When Macintosh HD is erased, quit the Disk Utility app and select &quot;Reinstall Mac OS X&quot; from the Utilities window.&lt;/li&gt;
&lt;li&gt;The reinstallation process is pretty well thought out, so it will guide you the rest of the way through.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;This may not seem like much, but I couldn't find anywhere that explained the whole process.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Zerply</title>
    <link href="http://iannopollo.com/blog/2011/09/24/zerply"/>
    <updated>2011-09-24T01:19:00-04:00</updated>
    <id>http://iannopollo.com/blog/2011/09/24/zerply</id>
    <content type="html">&lt;p&gt;I was recently informed by my tweeps of a new (at least new to me) service called &lt;a href=&quot;http://zerply.com&quot;&gt;Zerply&lt;/a&gt;. Weird name, but a cool site nonetheless.&lt;/p&gt;

&lt;!-- more --&gt;


&lt;p&gt;Zerply seems to be, more or less, a service like LinkedIn. It allows you to present your professional persona to prospective employers or co-workers. You do pretty much the same stuff as on LinkedIn: bio, experience, education, skills, a network of contacts.&lt;/p&gt;

&lt;p&gt;The thing that I really like about Zerply, in fact, the reason for this post, is the great design of the site. It is a well thought out, well-designed application. For LinkedIn, I think most people can agree that it is cluttered and unattractive. And the more I come to appreciate good design in everything (including websites), the more I enjoy using well designed websites and the more I &lt;em&gt;dislike&lt;/em&gt; using ugly ones.&lt;/p&gt;

&lt;p&gt;So, go check it out. Here's my &lt;a href=&quot;http://zerp.ly/siannopollo&quot;&gt;profile&lt;/a&gt;, and if you decide to sign up feel free to use my &lt;a href=&quot;http://zerp.ly/i/qNb0b&quot;&gt;referral link&lt;/a&gt;. I really hope Zerply does well and makes using professional networking tools enjoyable.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Tick 1.0 Released</title>
    <link href="http://iannopollo.com/blog/2011/08/08/tick-10-released"/>
    <updated>2011-08-08T23:08:00-04:00</updated>
    <id>http://iannopollo.com/blog/2011/08/08/tick-10-released</id>
    <content type="html">&lt;p&gt;After much work and testing I've finally released &lt;a href=&quot;/apps/mac/tick&quot;&gt;Tick&lt;/a&gt;, a timer and invoicing tool for freelance software developers. You can find it on the Mac App Store &lt;a href=&quot;http://itunes.apple.com/us/app/tick/id452557583?ls=1&amp;amp;mt=12&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;!--more--&gt;


&lt;p&gt;The idea for Tick started a few years ago as a web app. I built it primarily for myself in about 40 hours, and didn't need to market it to anyone, so it didn't have a name. I just called it my timer and chugged along, tracking my time in my web browser and sending PDF invoices when it was time to get paid for real work.&lt;/p&gt;

&lt;p&gt;Then one day, it started getting slow. &lt;strong&gt;&lt;em&gt;Dog slow&lt;/em&gt;&lt;/strong&gt;. It got to the point where I'd have to hit the site and go get a snack or do something else until the Rails app booted up. It felt like owning a PC. Now, I knew what the cause was (running it on a server that didn't have the resources for it), but I let it slide for a while. But one day I finally got fed up and asked &quot;How can I make this faster?&quot;. Here are the answers I came up with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get a bigger server&lt;/li&gt;
&lt;li&gt;Upgrade Rails and use better web techniques&lt;/li&gt;
&lt;li&gt;Go native&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I knew it wouldn't be worth it to get a bigger server, and frankly I was fed up with waiting for requests and responses in the browser. This left me with my last option: make a native app.&lt;/p&gt;

&lt;p&gt;One of the hardest things of making a native Mac app is coming up with a design that doesn't make you want to puke when you look at it. iPhone apps constrain the developer/designer and force you to follow a certain amount of standards. Limited screen space forces you to leave certain things out of an app, or design features in such a way that they work well on a smaller screen. Constraints are usually a very good thing.&lt;/p&gt;

&lt;p&gt;But with the Mac, there is no limit. You can go full screen or no screen. You can have multiple windows or just an icon in the menu bar. With great power comes great responsibility, so I can see how people go mildly insane and write an awful looking app for the Mac. To try to mitigate ending up with something completely awful I did a few things in my design:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Limit the size of the app&lt;/strong&gt; &lt;br&gt; Instead of allowing Tick to be used full screen, I constrained it to be about 500px wide. By limiting the space the app could take up, I lessened the chance of wanting to fill that space with features I didn't need.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use a consistent format&lt;/strong&gt; &lt;br&gt; Tick is comprised of 6 main screens, using the bar at the top to toggle between them. By making the screens consistent from one to another, it doesn't feel jarring to switch between them and I know where the controls should be for certain actions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Make all text legible&lt;/strong&gt; &lt;br&gt; I can't tell you how annoying it is to try to read too-small text. Besides just bothering me, there is usually no way in a native Mac app to make the text larger.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep the feature set small&lt;/strong&gt; &lt;br&gt; Keeping the window size of Tick small also helped to keep the feature set small. I know which features I use, but I don't know what anyone else might want. Instead of just guessing, I kept the features to a minimum viable product standard. I can always add more features later, but people usually get upset if you take away their pet feature, however small it may be.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;These are just a few of my initial insights from working on Tick. All in all I'm very happy in how Tick 1.0 turned out. Hopefully others can use these tips when working on their own pet project. And if you really want some more insight into Tick, and have 6 bucks, go &lt;a href=&quot;http://itunes.apple.com/us/app/tick/id452557583?ls=1&amp;amp;mt=12&quot;&gt;check it out on the Mac App Store&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Mac App Submission</title>
    <link href="http://iannopollo.com/blog/2011/07/30/mac-app-submission"/>
    <updated>2011-07-30T11:20:00-04:00</updated>
    <id>http://iannopollo.com/blog/2011/07/30/mac-app-submission</id>
    <content type="html">&lt;p&gt;I recently found myself needing to submit my new application &lt;a href=&quot;/apps/mac/tick&quot;&gt;Tick&lt;/a&gt; to the Mac App Store. I figured &quot;No problem! I've already gone through the iPhone app submission process, I'm sure this will be eerily similar.&quot; Well, yes and no.&lt;/p&gt;

&lt;!--more--&gt;


&lt;p&gt;So the things that stayed the same were these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create an app ID for my particular project.&lt;/li&gt;
&lt;li&gt;Create a certificate signing request with Keychain.app&lt;/li&gt;
&lt;li&gt;Use the certificate signing request to generate certificates that will be installed back into Keychain.app.&lt;/li&gt;
&lt;li&gt;Create a provisioning profile to install into Xcode that does the code signing.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I completed &lt;a href=&quot;https://developer.apple.com/devcenter/mac/checklist/#prepare&quot;&gt;all these steps&lt;/a&gt; without any major problems and then proceeded to Archive my app. The archive was built, code was signed, all was right with the world. Or so it seemed.&lt;/p&gt;

&lt;p&gt;I then tried to validate my archive before submitting it to Apple and the validation failed. Reason:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;The product archive package's signature is invalid. Ensure that it is signed with your &quot;3rd Party Developer Installer&quot; certificate.&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;I was stumped. I did everything the docs said, installed all certificates and profiles properly, but to no avail. I even contacts Apple and explained my problem. They were less than helpful and suggested I use one of my Technical Support Incidents, which &quot;are available for purchase in either a 2-Pack for $99 USD or 5-Pack for $249 USD&quot;. Ugh.&lt;/p&gt;

&lt;p&gt;I gave up on Apple being any assistance and uninstalled all my certificates and profiles, uninstalled Xcode, reinstalled Xcode and went through the whole process again making sure to follow all directions to the letter. In doing so I found a cryptic sentence on the main page of the Developer Certificate Utility:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;If you do not have the WWDR intermediate certificate installed, click here to download now.&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;Well, I never installed that. I didn't see any warnings stating that this was required. There was no explanation anywhere as to what the WWDR intermediate certificate even did. So, desperate, I installed the &lt;a href=&quot;http://developer.apple.com/certificationauthority/AppleWWDRCA.cer&quot; title=&quot;Download the WWDR intermediate certificate&quot;&gt;WWDR intermediate certificate&lt;/a&gt; on blind faith that it would solve my problems. And to my surprise, it did. I installed the certificate, restarted Xcode, archived my project and &lt;strong&gt;success&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;Hope this is helpful to anyone experiencing similarly maddening problems getting their app submitted to the Mac App Store.&lt;/p&gt;
</content>
  </entry>
  
</feed>
