Why Can’t I Run iPhone applications on my Mac?

A good friend of mine asked a relevant question last night over a birthday brewski last night.  “Why can’t I run my iPhone applications on my Mac?”  After a moments pause, I replied, only because Apple says so.

So before you write tell me I’m an idiot (which I might be anyway), I know there are some really valid reasons for not running portable apps on the desktop.  There is no motion sensor on the Mac so any application that needs the motion sensor is out.  Likewise anything that uses GPS or the compass is out.

One even could argue that many of the apps that pinch to zoom in and out would be out as well.  But let’s think about it for a minute.  How many of your iPhone apps really use all that?  On my iPhone the one app that uses this the most is Safari.  No need to use that on the desktop.  Same with Mail and a number of others.

Obviously Apple has figured it out because their emulator runs onto desktop.  I think Apple *could* run the iPhone apps on the desktop but they choose not to.

It makes me wonder if widgets wasn’t an early attempt at making an iPhone app.  Many of the things we’ve seen incorporated into Mac OS X have really been for the iPod/iPhone/iPad.  Coverflow looks nice on the Mac but I don’t see a lot of people using it – but on the iPod it sort of makes sense.  Widgets, while useful, have never made a lot of sense to me, but making a lightweight application for the iPod makes a LOT of sense.  Another example is the beautiful pop over control on the iPad.  It reminds me a lot (but not exactly) like the HUD windows on Mac OS X.

Those are just a few examples.  I’m sure we could come up with some other examples of Mac OS X-first technology that, while cool, was a gimmick on Mac OS X but makes a lot of sense for their portable hardware.  I wonder how many developers at Apple have worked on something and said, “This is stupid” only to see their work in a new device years later where it makes perfect sense?  I would love to know.

So Apple chooses not to allow iPhone apps on the desktop.  I’m cool with that.  But think about how nice it would be to have some of the iPhone games (all 50,000 of them) available on the Mac.  Even in a Windowed environment they would still be decent games.  Maybe a simple wrapper to allow the arrow keys to handle motion control would suffice for most of the games.  Maybe not, but it is an interesting thought.

Those 50,000 games would put Mac gaming in the mainstream very quickly.  Of course it might have the effect of killing desktop only game development but perhaps not.  I think there’s plenty of market out there for people like me that will gladly play $1.99 to $9.99 for a quality casual game.

Plants vs. Zombies is my current favorite iPhone/iPad game.  It has a desktop version but I don’t want to pay for it again.  On the iPad the iPhone version looks great at double size and I imagine it would in a double size window on my desktop too (which, if memory serves is roughly half the size of the window for the desktop version).

I think this could be a huge deal for the Mac OS X market.  I doubt Apple will allow that any time soon but I’ve often been wrong before.

My friend needs to give himself more credit.  It was a good question.  What are your thoughts?

(By the way, Happy Birthday, Robert!)

REALbasic for iPhone Revisited

The iPhone 4.0 SDK was announced today by Apple.  It has a ton of new features and most are welcome.  It’s not all good news, however.  Stuck in section 3.1.1 of the new iPhone Developer Program License Agreement is the following:

Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

Wow.  I find this to be simply, and utterly, the most arrogant thing that Apple has done in my many years of being an Apple fan.  I find this to be distasteful in the extreme.  Words can’t describe how angry/disappointed I am in the “Think Different” company.

Now lets talk about the debate we had a while back of REALbasic making apps for the iPhone.  In my debate with Marc Zeedar for March/April 2010 issue of REALbasic Developer Magazine I said this:

An iPhone version depends on the willingness of Apple to let REAL Software play in their court. I have my doubts that Apple would do that simply because all of those 140,000+ iPhone applications they’re touting were developed on a Mac. Letting go of those hardware sales is not in Apple’s best interest economically. Not only that, but letting RS create iPhone apps now makes Apple dependent upon a third-party to issue bug fixes in the framework and be up-to-date whenever a new SDK is released.

I think today’s new license agreement proves my point.  Apple is going to control everything and if you don’t want to learn Objective-C and use XCode and CocoaTouch too bad for you.  Apple controls the entire ecosystem and they are not going to let anyone play in their court.

Much will be said in the upcoming weeks and months about the new license agreement.  The anti-Apple folks will use this to bludgeon the advancement of the iPhone and iPad into the corporate environments.  What will pro-Apple folks do?  Shut-up and start learning xCode and Objective-C because there’s not much to defend.

Will it always be this way?  I don’t know.  But I do know that nothing will change unless Apple starts losing money and by all accounts that’s not going to happen any time soon.

REALbasic on iPhone Debate

The March/April 2010 edition of REALbasic Developer Magazine hit my inbox this morning.  Besides the normal BKeeney Briefs column Marc Zeedar and I have a spirited debate on whether or not REAL Software should devote existing resources to making REAL Studio work with iPhone apps.

Note the italics on ‘existing’.  While I think it would be a nifty idea, overall, I question the wisdom of diverting resources from an already small development team to a product that might be doable.  Is this a Mac OS X only product or is it cross-platform?  I seriously doubt that it will be cross-platform but perhaps I’m wrong.  The point is that there are a ton of issues to figure out and then the question then becomes, “What are we going to give up in the desktop versions while this is being developed?”

Other thoughts:  Apple makes a boatload of money from developers buying Mac hardware and this product has the potential to take that revenue away.  One could certainly argue that it has the potential to sell more iPhones/iPads/iPod touches because more applications will be available.  But Apple has 140,000-ish apps right now.  Would 10,000 more, or 100,000 more really mean anything to Apple?

It also has the potential of being a potential support issue for Apple.  Assume for a second they allow RS to make iPhone apps.  The RB framework has a bug (because that’s never happened), or Apple changes the SDK one day and doesn’t give RS advance notice (Apple is secretive, no?), and now tens of thousands of RB iPhone apps no longer work.  Will the developer, RS or Apple get the blame?  Apple.  Just like how Microsoft gets the blame for crappy drivers and crappy 3rd party apps made by bad developers, Apple would get the blame.  Apple guards the keys to their kingdom very closely because they want it to be associated with a classy, premium product that “just works”.

Anyway, you can read the debate between Marc and myself in the magazine.  My guess is you can figure out my viewpoint.   😛  Marc argues, the opposite.

My regular column talks about making your projects more Agile-ish without going full-bore in using the Agile process.  It’s not as hard as you think and your clients might really like it.

Your thoughts?

My Most Wanted iPhone App

I’ve had a sudden uptick in time spent at the gym and I have a heart rate monitor. I’d love to be able to track my workouts to see if I’m doing okay or need to up the intensity a little.  Apple and Nike have the Nike+ where millions of people are storing and tracking their running statistics.

In the July issue of Wired there’s an article on how Nike unleashed the power of personal metrics.   This is what I want for my heart rate monitor.  I want to track and be reminded of what I can push myself to do and I want it in an easy-to-use, no-brainer iPhone application.

I’ve even looked into it a bit.  There’s the SMHeart Link heart rate monitor but it uses a ‘wireless bridge’ (does that mean it’s wifi?) and the reviews on the Apple App store have not been stellar (but is that in part due to the free app requiring a $125 adapter?).  Is there a BlueTooth heart rate monitor that I can use with the iPhone (even if I have to develop it myself!)?

I found this page that has a lot of iPhone apps that aid in your workout.  But after reading through the reviews none of them use a heart rate monitor (I might have missed one so please be gentle!).

Is it really that hard or is the technology not available yet?

iPhone Copy/Paste Thoughts

It seems that Cut/Copy/Paste in desktop applications has been around forever.  I remember it being there on the MacPlus I used at the IIT computer lab back in 1986 – it was the greatest thing since sliced bread and it wowed those of us daring to use it.

One thing that comes with Cut/Copy/Paste is an undo system.  You cut or paste a large section of text into a place where you didn’t want it:  Are you going to type it all in again if you made a mistake?  No!  You’re going to select undo from the Edit menu so you don’t have to do all that work.

And that, my friends, I think is where having cut/copy/paste on the iPhone becomes extremely difficult.  I don’t think implementing cut/copy/paste is all that difficult with gestures.  Adding a standardized undo system to the iPhone, however, IS a big deal.  What gestures do you use to invoke it?  Then you have to have the obligatory redo command and how do you do that with gestures?

As I’ve journeyed into Cocoa and CocoaTouch (and I’ve barely scratched the surface) there are a number of things a desktop app gets for free with Cocoa.  One of those is an undo system using the NSUndoManager.  With document-based Cocoa apps, an undo manager is created for you for each document and you can implement NSUndoManager on your own if you need.

Until CocoaTouch gets its own UndoManager I don’t think you’ll see Cut/Copy/Paste on the iPhone.  Version 3 anyone?

Did I miss anything?  Feel free to sound off below.  (Keep in mind that I’m a newbie when it comes to Cocoa and CocoaTouch so be gentle – ‘kay?)

REALbasic for iPhone

If you’re a REALbasic developer and you’ve never used another language in your life then xCode and Cocoa will be….daunting?  It’s not impossible to learn.  I mean it’s just another language (among many) and another framework (among many).  I think I can say with some certainty that working with xCode isn’t nearly as easy as dealing with REALbasic.

Sure, there’s a learning curve with learning REALbasic.  RB is designed, however, to protect the user from themselves.  Arguably, it’s easy enough to get in a bad situation in RB but there’s a logical progression to things.  There’s a tight coupling between the things you see on the screen and the events and code behind it.  Not so in Cocoa where you define your own events and call them when you want and are forced to use the Model-View-Controller design pattern.  MVC separates the business logic from the user interface.  RB and its cousin VB6 make it easy to combine and mix and match the two (I’ll leave it to the programming language Nazi’s to argue one approach versus the other).

The xCode environment isn’t nearly as friendly as REALbasic’s.  You have to go hunting for information but I suspect that it will become 2nd nature in a matter of time (hopefully a day or so and not weeks).  One thing I do like about xCode is the level of documentation available and the videos and external links for iPhone and Cocoa application development.
Wouldn’t it be awesome if REALbasic could create iPhone applications?  You get to use an easy-to-use interface with a relatively easy-to-use framework.  Of course there are some fairly large technical and political challenges to such a task but probably none of them insurmountable.  Here’s my quick and dirty list:

•    Apple would have to allow it.  Will the Steve allow Real Software to steal some of Apple’s thunder?  A better question is will it help Apple sell more iPhones?  I say the answer is yes because more developers mean more apps which means more iPhones.

•    REALbasic currently creates Mac applications using dynamic libraries (dylibs).  Unfortunately, it appears that it’s part of the SDK agreement that you cannot use private frameworks or libraries.  Any app that tries to install frameworks or library code will be rejected.  That would be a big hurdle to overcome.  But, surprisingly enough, Apple uses dylibs on some of their own apps so maybe this restriction could be overcome.

•    The RB form editor would have to be redone to use iPhone specific controls.  At this point, would be it be easier to make a separate REALbasic for iPhone product for sale?  Possibly.  Or maybe it makes sense to make REALbasic Mobile and add other mobile environments as they get done.

I’m probably missing a whole host of issues but it sounds interesting.  IF Real Software could do it, it would put them on the map so-to-speak and darn near every developer thinking about developing for iPhone would know their name.  RB is a Rapid Application Development environment and xCode/Cocoa is not.  Think of the cost savings in development time!

So what do you think?  Have I gone completely off my rocker?  Have I been staring at code too long today?  Is there a chance in hell that Apple would give RS their blessing?