Posts Tagged apple

MacBook Pro Retina is as good as promised

I’ve been using a new MacBook Pro with Retina display for the past week or so and it’s by far the best Mac laptop upgrade in quite awhile. For various reasons I’ve used a whole bunch of different Mac laptops over the past few years leading up to it:

  • Pre-unibody 15″ MacBook Pro
  • 13″ unibody MacBook Pro (core 2 duo)
  • 15″ unibody MacBook Pro (i7 dual core)
  • 13″ MacBook Air (i7 dual core)
  • 15″ unibody MacBook Pro (i7 quad core)

Of these, everything up through the last 2011 MacBook Pro was not a desktop replacement. In fact, the inability to be one is what pushed me towards the MacBook Air to at least have something light and small for travel and meetings since at both work an home I had separate 27-inch iMacs for the heavy lifting. The quad-core MacBook Pro with an SSD upgrade and ability to take 16GB of RAM finally made a totally viable desktop replacement again, and became pretty much the only computer I used for the last six months. But, it was painful after having embraced the MacBook Air to be back to such a (relative) clunker. Since most of the features continuing to date the unibody design were things I had long given up using (optical drive, ethernet, firewire) I was more than ready for a slim MacBook Pro without these.

The Retina MacBook Pro was is this plus a whole bunch of display awesomeness. It’s nearly the agility of a MacBook Air with RAM, CPU, and storage that performs like a really fast desktop. But the display… well, having spent a lot of time using retina displays on the iPhone and new iPad it’s exactly the beauty you’d expect, now happily married to desktop tasks like software development. As an iOS developer, it especially stands out having Xcode and the iOS Simulator quietly render all of the Retina assets at full quality using the @2x versions just like the real device would, and working with high-res assets in Photoshop is also a joy. But even simply scrolling and reading tons of text (an inescapable part of writing code) is much easier on the eyes with the Retina display, and of course everything about the core OS just looks great with it as well.

I was also surprised by how useful the other scaled HiDPI resolutions are. Going up from the Retina default of 1440×900 (which is perfectly doubled) to 1680×1050 (the old 15″ hi-res native resolution) is quite readable and sharp, great for lots of workspace when the MBP is your only display.  Going up to 1920×1200 still stays quite clear in terms of scaling but is a touch small for my taste, and 2880×1800 – absolute native resolution, and only achievable through a third-party display utility like SwitchResX – is quite absurd, really only good for marveling at what your display is capable of and then quickly changing back to avoid a headache!

Of course I obviously don’t miss the lack of optical, ethernet, or firewire, but beyond the slim form factor and display my favorite sleeper feature has been finally having a multitude of external display ports. While single thunderbolt works well for a cinema display or iMac in target display mode, a basic side-by-side setup of multiple 1080p LCD’s (a cheap and common desktop setup) always required some imperfect solution until now: either get a display splitter that connects two displays to the single DVI connection and acts like one giant desktop across them (menu bar and dock with a monitor edge down the center? no thanks), or connecting one natively and sacracifing the other to a very mediocre and laggy DVI-over-USB connection like DisplayLink. But with the new MBP it’s possible to connect not just two but three external displays, all with full hardware-accelerated capability.

It’s worth mentioning that the flash storage is ridiculously fast as well, but having already converted to exclusive use of SSDs over the past couple years I can’t say I noticed a difference; it’s just something that finally comes standard without a ridiculous add-on price or need for a third-party drive swap anymore. Battery life seems as good as the previous MacBook Pro which is not stellar but good enough (I’m going to be charging this thing every day anyway), and other minor upgrades like better speakers and inclusion of USB 3.0 are handy but not something I use on a daily basis.

If there is one downside to the Retina display it’s probably the unavoidable glare of a glossy screen, and while it’s a huge improvement over the earlier MacBook Pro’s (and from what I can tell, also a tad better than the recent MacBook Air), side-by-side with a matte screen in front of any direct window light or unfortunate overhead fluorescent lightning it’s still quite obvious. I’m sure this would bother me more in a typical corporate office, but since I’m using it for now at a scrappy startup loft, random coffee shops, or on the couch at home it hasn’t been a problem. But on the flip side I can’t say I use the display for watching a whole bunch of movies where the glossy finish might shine either so it’s sort of a non-feature for me.

A supposed downside I keep reading about is the lack of upgradability. There were basically two things the last MacBook Pro let a user easily upgrade: the storage drive and RAM. While not user-upgradeable now, it’s a reasonably-priced BTO option to include 16GB of RAM (the most that could be upgraded with current sticks and two RAM slots anyway), and of course the built-in flash storage, while expensive, is equally fast and high quality. For a laptop I’m going to replace every 1-2 years anyway this is more than a fair trade for slender, light form factor, and having already embraced it with the MacBook Air it doesn’t bother me at all.

Overall, if a Mac is your daily laptop you will love the Retina MacBook Pro. It’s a huge upgrade and undoubtedly sets the bar for a new generation of power-user laptops led by Apple.

, ,

No Comments

MacBook Pro is finally a desktop replacement again

I just built a loaded up MacBook Pro for my new job and am relieved to find that, finally, they’re viable as a desktop replacement for development work again! I’ve been using an iMac + MacBook Air combination for the past year or so which worked fine when the bulk of my real productive time was at the iMac and the laptop was just for the occasional meeting and travel, but I’m now at a startup again I really one portable computer that does it all wherever I need it.

Based on the recent benchmarks I figured the late 2011 upgrades would put the MBP in the desktop contention range and I was right: quad core, the ability to finally get 16GB SODIMMs as 2×8 for under $200, and the relative cheapness of a blazing-fast third-party SATA III SSD upgrade (I went for a Crucial M4) makes it come in only a hair beneath a fully-loaded iMac (graphics capabilities aside) for somewhere in the ballpark of $3k. Of course, that’s without a 27″ display – but as much as I still love my 27″ iMac at home I honestly found the extreme glossiness pretty bad under office lighting anyway, and am more than happy to wire up a couple generic 23″ anti-glares for a fraction of the cost!

Overall, it’s a killer machine for doing tons of iOS, Android, and miscellaneous server development side-by side with all the IDE’s open and a pile of devices connected without so much as a hiccup, and as a quiet computer fanatic I love that I really have to go out of my way to push it before I ever hear a fan.


No Comments

Automated iOS Jenkins builds with application tests and Core Data

I recently started some iOS development with a new team and had the chance to set up a server for continuous integration builds. Since our teams are already familiar with Jenkins that seemed like the logical place to start, and the Xcode plugin available works reasonably well out-of-the-box for simply building the application. However, running tests – especially what Apple calls application tests (anything accessing a bootstrapped NSApplication through the simulator) using Core Data – took a little bit of tweaking. Here’s what was needed as of Xcode 4.2.

  1. Install the latest version of Jenkins, either on a Mac with Xcode installed or another server that has such a Mac available as a slave for any iOS builds
  2. Install a plugin for your source control system of choice if not already present (I’m using Git with the default Git plugin - considering the great Git support added in Xcode 4 with Git repos enabled by default, if you’ve been looking for an excuse to switch this is it!)
  3. Install the Xcode plugin
  4. Create a build following the plugin build instructions for a basic release build of the application, and especially pay attention to the keychain notes (I went ahead and entered the login password of the build account so that Jenkins could unlock it itself)
  5. Run a build and verify that everything is successful up to this point, and if not, troubleshoot
  6. Edit the build and add a separate build target for testing following the plugin test instructions, specifying iphonesimulator as the SDK (you can enter a full absolute path like the example if you wish, but simply iphonesimulator should find the latest), and make sure it points to your project’s test target instead of the primary build target (e.g. MyAppTests instead of MyApp)
  7. Run a build and look for errors. Assuming you have one or more application tests expecting to run in the iOS simulator it will probably have skipped all the tests with an error like ”Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set).”
  8. To fix the error above (or prepare for it, if application tests don’t exist yet but will eventually), on the Jenkins server (or slave if running the iOS build on a slave) edit:
    /Developer/Platforms/iPhoneSimulator.platform/Developer/Tools/RunPlatformUnitTests (if Xcode <= 4.2)
    /Applications/ (if Xcode >= 4.3)

    and change line 95 from:

    Warning ${LINENO} "Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set)."

    to these 2 lines:

    export OTHER_TEST_FLAGS="-RegisterForSystemEvents"
    RunTestsForApplication "${TEST_HOST}" "${TEST_BUNDLE_PATH}"

    as described in Xcode 4: Running Application Tests From The Command Line in iOS (and if you want to be able to run command-line builds with tests on any local developer environments, like xcodebuild -target MyAppTests -sdk iphonesimulator, this is the step to do on each of those as well)

  9. Run a build again and look for errors. Assuming you have application tests for portions of the application using Core Data, you may see an error relating to the storage URL like “Error validating url for store”
  10. To fix the error above (or prepare for it, if the application doesn’t use Core Data yet but will eventually), you’ll need to change several of the configuration methods for Core Data to operate differently during command-line tests as described in iOS Unit Testing with Xcode 4 and Core Data; not covered here is how exactly to detect if you’re in a test, which I did by checking the WRAPPER_NAME environment variable like this (and I have local data being written inside the generated ./build directory):
    * Determine if application is running from a test inside an external command-line build by xcodebuild.
    - (BOOL) isExternalBuild
        NSString *wrapper = [[[NSProcessInfo processInfo]environment] valueForKey:@"WRAPPER_NAME"];
        return wrapper != nil && ([wrapper rangeOfString:@"octest"].location != NSNotFound);
    Returns the managed object model for the application.
    If the model doesn't already exist, it is created from the application's model.
    - (NSManagedObjectModel *)managedObjectModel
        if (__managedObjectModel != nil) {
            return __managedObjectModel;
        if([self isExternalBuild]) {
            NSArray *bundles = [NSArray arrayWithObject:[NSBundle bundleForClass:[self class]]];
            __managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:bundles];
        } else {
            NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"MyApp" withExtension:@"momd"];
            __managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
        return __managedObjectModel;
    Returns the URL to the application's Documents directory.
    - (NSURL *)applicationDocumentsDirectory
        if([self isExternalBuild]) {
            NSString *dir = [NSString stringWithFormat:@"%@/build", [[NSFileManager defaultManager] currentDirectoryPath]];
            return [NSURL fileURLWithPath:dir];
        } else {
            return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
  11. Run another build and look for errors. If you see a more generic error along the lines of “UISplitViewController is only supported when running under UIUserInterfaceIdiomPad” or messages like “Timed out trying to acquire capabilities data.” during the run, your build server may not have the necessary scheme metadata from Xcode.
  12. To fix the error above, first make sure you’ve checked the Shared checkbox in the Manage Schemes dialog of your project, which will place some additional metadata in the project directory that you can commit to source control (but make sure you don’t then ignore them!) as described in Managing Schemes
  13. If you still see the error the iOS simulator probably has not been launched on the build machine since the last restart; it must have run once to start the necessary services but also cannot be open when the test runs, so to handle this automatically you may want to add a simple execute shell targetat the beginning of your build like:
    open '/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone'
    sleep 3
    killall 'iPhone Simulator'
  14. Run another build and hopefully this one works! If not, post the additional steps required and I will add them to this checklist.
  15. Once everything is working perfectly in Jenkins you’ll want to confirm that you can still run both the application and any test targets successfully in the simulator or on a device directly through Xcode. The steps here should support this unless you’ve missed something.

, , , ,


Remembering Steve Jobs

Steve Jobs passed away yesterday and I’ve been struck by the outpouring of appreciation and remembrance from consumers and the industry alike.

For me, Apple products and culture have always been the pinnacle of why it’s cool to do the kind of work I do, and nobody embodied this better than Steve himself. As a bit of a fanatical perfectionist myself I love that Steve never settled for second best and pushed people hard not to drive them into the ground, but to hone them and their ideas into the very best they could possibly be. But even more importantly he wasn’t just the king of geeks as so many giants in the industry are, but a real consumer’s inventor building things that made computers, the internet, and portable music accessible not just to tech heads like me but to my friends, my parents, and now even my baby.

My connection to Apple and Steve is also a sentimental one. My family’s first computer was an Apple IIgs on which I wrote my first programs in elementary school (yes, in BASIC), and when I got my hands on a Mac Plus and eventually newer Macs I was consumed with tinkering with the Finder in ResEdit (replacing the Welcome to Macintosh dialog icon with my face was a favorite of my parents), building crazy apps with HyperCard, and generally being mesmerized by MultiFinder, AppleTalk, and so many other now-defunct Apple ideas that made things “just work” in an era when absolutely everything about computers and connectivity was a nightmare. I gained plenty of experience tweaking out Unix, later Linux, and Windows setups with friends, school, and work, but my heart was won by Apple. I became that guy who had to do everything just a little bit better on his Mac. When I finally managed to save up for my first computer that was “all mine” in middle school, it was a Mac (and the Mac price premium in the 90′s was still no joke!), and when I downloaded my first MP3 (New, if you must know) it was loving played on my very own Mac using Audion. I hauled my Mac around to LAN parties and then eventually off to college.

Not far into college, and already working at a company producing mainframe-esque software that had very little in common with Apple, I was lucky enough to get on board the Apple University Program and win a free tip to the Apple WWDC that year. While I couldn’t realize the significance at the time, this was a really pivotal time for Apple: Mac OS X had just gone beta and they were on the verge of iTunes and iPod taking the world by storm. We happily piled into our campus rep’s company van and trekked from Boulder to Cupertino, tinkering with our Apple-provided Blueberry, Lime, and Tangerine iBooks (back when this was a laptop not an eBook!) all the way. Once there we got to hear more about how Mac OS X was going to change the world, see the iTunes visualizer splashed across every projectable wall in site, and bask in the notorious “reality distortion field” from Steve himself. And if the trip wasn’t already enough, I was lucky enough to be the winner of a brand new white iBook from their random drawing! I proudly vowed to use it for all my ongoing Unix and Java development. Steve told us all that if we were serious we should really come back and work at Apple that summer, and while I didn’t take him up on it every hyped Apple product release since (which in retrospect, this one surely paled in comparison to), makes me smile and think of this trip right as Apple was on the verge of becoming the king of consumer computing.

Now, Apple products provide not just some elitist way I can do everything with my computer better and easier, but a complete transformation of how I live my day. Mac at work, Mac at school, iPod in the car, iPhone, iPad, Apple TV… there’s nothing I couldn’t do per se without any one of these, but replace them with the runner-up across the board and it would be a very mediocre experience indeed. Every day for me and millions of others is more productive, more enjoyable, and more wonderful because of these ideas that became products that became staples of how we relate to technology, and ultimately, each other.

Steve, you were the ultimate inventor who knew what the world wanted before we did and a model for accepting only the best for all of us who build hardware, software, and user experiences for a living. Thank you for making our world so much better and the brilliant legacy of Apple (and Pixar!) to continue to amaze us for many years to come.



My PC is now a Hac Pro

Since I’ve been using my MacBook Pro so much recently I decided to go ahead and turn my custom-built desktop PC into a Hackintosh, in this case Hac Pro. While this took several attempts I finally got it working thanks to all the great work over at InsanelyMac.

I started out following this Asus P6T Deluxe V2 guide, but then ultimately opted for an iBoot + MultiBeast install giving me a more current version of Chameleon, core kexts, useful utilities, and most importantly a working ATI injector for my Radeon 5870. Then I added in by hand some of the kexts for my hardware (ethernet, audio, etc.) from the Asus P6T Deluxe guides.

So far it’s running like a champ; all the Apple software works like I’d expect and anything stressing the hardware (like games) seem at least as fast as they did in its previous life under Windows 7. Good times!


No Comments