Monthly Archives: June 2007

Compling a Cocoa application for Windows–getting closer

We’re getting closer to the day when Xcode will display the “Windows” check box as a compile option. Check out [this post from the Cocoatron mailing list](http://groups.google.com/group/cocotron-dev/browse_thread/thread/83f4db0144b4cb53/b6158c19b1551dd0?#b6158c19b1551dd0) where two of the devs talk about the obvious: using Apple’s CoreFoundation code to compile a Windows app written in Cocoa.

I’ll say it again: Apple’s money-making iApps are likely written in Cocoa or using Cocoa and Carbon and those frameworks have been written to allow for Windows compilation. If Apple’s doing it, you’ll be able to do it, but only when Apple’s worked out enough bugs to protect their reputation–no one wants to make buggy Windows software out of the gate. Also, Apple needs to look like they are the best at the technology they bought years ago and that hasn’t happened yet.

So here’s the obvious list:

* Cocoa for Windows ([“Yellow Box”](http://www.cocoadev.com/index.pl?YellowBox)) exists today inside Apple only. Proof is in WebKit source code.

* Cocoa allows Apple to “wall off” the rest of the Windows assorted crud and build their own apps using Windows as the runtime. Note how the UI elements, [font smoothing]()http://www.joelonsoftware.com/items/2007/06/12.html) and general application behavior are like *MacOS X* rather than Windows. This is similar to a Java app running in Windows. It’s also very different than the average Windows developer.

* Cocoa for Windows will encourge Windows developers to write for the Mac. Those Windows developers will find out that the bridge is one way and the toll is to port your app to Objective C. Apple’s typical attitude: “You’re doing it wrong unless you’re doing it our way”.

* Apple doesn’t want a lot of independent developers that help their platform. They don’t want a few large developers either (Adobe for instance). Instead, they want the developer to look good because of *Apple’s* halo effect. Remember, Apple’s the star and not your app. People should buy an Apple product because of Apple and not the outside developer.

* Apple will ship another Windows app next year to help them make money from the Windows platform.

Welcome DZone Readers!

Based on the traffic I’ve snagged in the last day, it looks like I got linked from [DZone](http://dzone.com), a software developer’s resource website. Thanks!

My name is Steve Kirks, an amateur software developer on the Mac platform, web and scripting geek and a foodie, too. This is my personal site and you’ll find I write about three basic things: web and software development, food and random personal crap. I hope you’ll consider subscribing.

AppleTV+EA Games= Xbox 360 Killer?

You kind of have to wonder if we’re looking at a revolution moment like the time when the iPod came out. EA (Electronic Arts to the old skool’rs) announced today that it was publishing some of it’s most popular games on Mac OS X. Note that it’s EA that’s publishing the title, not a port by a popular gamehouse like MacPlay.

These games run on Mac OS X. The AppleTV runs Mac OS X. Put it together and the results are obvious.

But it doesn’t have enough video memory!

Whatever. How much memory do you think that the Xbox 360 has anyway? With the full overhead of the desktop version of OS X, the AppleTV could run it. How long before we start to see someone hack the AppleTV with the larger hard drive to handle something like this?

Safari is the Trojan Horse that carries Cocoa

Take a look at the image below:

login-dialog.png

Look familiar? It’s the standard MacOS X (OS X now, I guess) dialog sheet. Just how much of the Cocoa library is cross platform now? Try CoreFoundation and CoreGraphics. They are DLLs included in the Safari beta.

By the way, it’s interesting that the Safari beta wants to store my password in keychain, something that doesn’t exist on Windows.

Yet.

Let’s add up some things:

Apple starts with QuickTime and (quietly) ports Carbon to Windows. Apple then adds iTunes to Windows using more of the Carbon library. In order to get iTunes 7 running on Windows, they port most of the Cocoa framework and it works fine. The roll out Safari to flesh out the bugs in the networking code. Next WWDC in 2008: Cocoa for Windows, Xcode one-click compile for Windows.

By then, Apple would have in place on Windows:

* Networking code done outside of Win32 libraries
* A software update mechnaism
* a Javascript/XHTML runtime
* A GUI library

Sounds like the iPhone developer platfrom, eh?

Widgets running on Windows as “Dashboard for Windows”…

Hmmmm….