New gadgets by the healthy fruit

Standing in line to purchase an iPad 2, I thought to myself: „What’s up next?“
What new invention is Apple coming up with in the future?
I don’t mean something like the iPhone 7 with integrated projector or an in-ear iPod.
What new device class are they going to conquer and be followed by competitors?

Side remark here: I’m not a total Apple freak but seeing the market situation, I don’t see any other company’s inventions generating such a hype and follow ups.

During my university years I stumbled across Mark Weiser’s ideas on ubiquitous computing.
Within the idea of unconcious, connected, everywhere computing, he developed the idea of three device classes substituting the good old home PC:

  • tabs, wearable centimeter-sized devices
  • pads, handheld decimeter-sized devices
  • boards, metre-sized interactive display devices


  • Sounds familiar?

    Keep in mind that this was 1988, only a few years after someone supposedly said that 640kb ought to be enough for anybody.

    And today?
    We got them all, even if there is still a gap between Weiser’s vision and current reality.
    But Apple only put a lable on the first two device classes up till now. We have multifunctional devices that we carry around all the time and sometimes even phone with. We have tabs and portable computers we can easily take to a meeting or bed.
    Everything is synced and cloudy. We don’t need to know how exactly it works, as it simply works – most of the time. Ever read a manual for an iPhone or iPad? It’s basically: „Turn it on.“
    And yes, we have bigger devices called TV, but some of them still with CRT display! There are some little boxes we can connect to those things, to pimp ‘em, but that feels like installing a race-car steering-wheel in your Trabant to make it faster.

    See where I’m going?
    They are gonna stuff the AppleTV hardware in a flat metre-sized screen-device, add some cameras and sensors for facetime and gaming, give it a nice flat look and hang it on a wall.
    That’s all.

    With Apples technology establishing a market for functional, powerful, user-friendly devices, we are approaching ubiquitous computing.

    Another post on UnitTesting for iPhone

    Geez Arne, your first post and it’s about unit testing for iPhone? Let me google that for you.

    I know, that there are quite a few good tutorials out there. Where do you think I got the input from?
    Point is, that I’d like to track my tasks and have a cookbook ready for me, my colleagues and everyone, who wants to set this up in five minutes.
    Which might be you.

    I wont discuss pros of software testing as there are no cons to me.
    I wont discuss different solutions as this seems to be the easiest way to get it started. Dig deeper, once you broke the surface.

    I’m doing this with xCode v3.2.5 and the Google Toolbox for Mac. I’m not using the build-in testing stuff, which appears to be buggy since xCode v3.2 (so much on “not discussing different solutions”).

    Step 1: Set it up

    • get the GTM sources from svn.
    • in the application you’re about to test, create a new target (right-click the project > Add > New Target… > Cocoa Touch Application)
    • add the following sources you grabbed from svn to your target (right-click your test target > Add > Existing Files… ):
      google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestMain.m
      google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.m
      google-toolbox-for-mac/UnitTesting/GTMSenTestCase.m
      google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.m
      google-toolbox-for-mac/Foundation/GTMObjC2Runtime.m
      google-toolbox-for-mac/Foundation/GTMRegex.m

    • create a new Group for testing stuff(right-click project > Add > New Group)
    • add these headers to your project (right-click your TestGroup > Add > Existing Files…):
      google-toolbox-for-mac/UnitTesting/GTMIPhoneUnitTestDelegate.h
      google-toolbox-for-mac/UnitTesting/GTMSenTestCase.h
      google-toolbox-for-mac/UnitTesting/GTMUnitTestDevLog.h
      google-toolbox-for-mac/Foundation/GTMObjC2Runtime.h
      google-toolbox-for-mac/Foundation/GTMRegex.h
      google-toolbox-for-mac/GTMDefines.h

    • You could just drag and drop all of the above files in the project I guess, but this way, you’re sure, they are members of your TestTarget.

    • add a new run script to your test target (right-click target > Add > New Build Phase > New Run Script Build Phase) and insert your path to google-toolbox-for-mac/UnitTesting/RunIPhoneUnitTest.sh in the “Script” field. If you don’t know, what I’m talking about, you probably are not shown the Info-Screen for you newly build run script. Just Unfold the test target and double click the run script in there, to get to the Info Screen.
    • now somewhere in your project you should find the TestTargetName-Info.plist file. Clear the property “Main nib file base name”

    Step 2: Build

    • Activate your TestTarget and the Simulator
    • Build

    Now you’ve got a testing environment set up for your project.

    Step 3: Write Tests

    • Add the sources you want to test to your TestTarget (right-click the file > Get Info > Targets-Tab > Check your TestTarget)
    • Add a new test file to your project, preferably under the Group you hopefully created for testing (right-click the group > New > New File… > Objective C Test Case Class).
    • In the header you replace the import <SenTestingKit/SenTestingKit.h> with “GTMSenTestCase.h”
    • let the class inherit from GTMTestCase instead of SenTestCase

    Now, if you write a “test”-prefixed method like -(void) testWeaponsOfMassDestruction it will be tested during a build. If a test fails, the line is highlighted with a build error. Play around with the assertions (STAssertXY) and have fun.

    One additional thing I did was to strip down the GTM package to the required stuff for testing and put it in the project folder. This way we have a lean framework which can be shared into your versioning system and having nice, relative paths in the project (e.g. the run script command).

    This was easy, right? So do it. Test.

    By the way: most of the stuff above can be read here, but ain’t redundancy cool?