Developing for Mac OS X, on Windows?

2019-02-04 22:29发布

问题:

Well, simple situation. I happen to be a software engineer who uses mostly Delphi and C# for software development. Delphi is great for desktop applications while C# is ideal combined with ASP.NET for web applications. However, I am considering to teach myself more about software development for the Mac. Xcode and Cocoa would be the environments to start with. Learning new languages is no problem for me!

However, before starting to write code on a Mac, I first need to buy one and they're reasonable expensive so buying one is a decision that will take me a few months before I know which one I need. So, to help me right now, I would like to know the possibilities that I have to learn more about Mac development without the need for a Mac!

For example, does OS X work in a VMWare environment? Are the development tools also available for Windows? Is there a clear API overview of the OS X libraries?

Or should I first buy a Mac, play with it for a few weeks and then decide on how to develop software for it? In other words, should I start spending now, or in a few months? :-)

回答1:

Perhaps a macmini would be the best bet but failing that:

MacOSX in VMWare: http://wiki.osx86project.org/wiki/index.php/Vmware_how_to

Development tools for windows? I'd stick to XCode as it can compile multi-binary apps.

Here's the clearest overview I can think of: http://developer.apple.com/referencelibrary/MacOSX/index.html

Hope this helps!



回答2:

Good Mac (or iPhone) software is an artisan product; it reflects the culture and tastes of Mac (or iPhone) users. Because the Mac is a premium platform, users tend to be more sensitive to the feel and polish of the apps. Thus to successfully program for the Mac/iPhone or even grok the Cocoa frameworks properly, you have to grok the Mac user experience. Although many coming from the Windows or other-UNIX world try to skip this step, they do so at their own peril.

So, as a Mac developer (who also writes for other UNIX OSes), my recommendation is buy a Mac and start using it, full time if you can. A Mac Mini is completely adequate for development and will set you back only a few hundered dollars, including the OS. Consider that on Windows, this is often less than the price of a full VS license. Everything else (Xcode, libraries, etc.) are free.

Once you have a Mac and begin to grok the feel of things, you'll discover that there are a number of development options. Besides the Cocoa frameworks--which can be used from Python (via the built-in PyObjC bridge), Ruby (via MacRuby or RubyCocoa)—-there are a number of other options. Qt from Nokia and Mono are viable. Often cross-platform apps written in Qt or Mono are disliked on the Mac because they don't feel "native" (see above), but really the problem is not the framework. If you get the Mac user experience you can write a very passable Mac app in a cross platform framework. You just have to intend to write a Mac app, not get a Windows app working on the Mac.



回答3:

Mac OS X works in a VMWare...

Unfortunately XCode works only on Mac OS...

There are versions of Max OS, which runs on x86 machines. You can avoid buying a Mac PC, but you have to pay for the OS and XCode...

EDIT: Xcode is free



回答4:

You definitely want a Mac if you want to develop for the Mac. Even Java requires local testing.

That said, Macs are not very expensive and run Windows too.

If you want to learn and start programming before you have a Mac, I recommend either Java or .NET, specifically Delphi Prism.

See here my own first experiment with Delphi prism:

http://leaukiprog.blogspot.com/2009/07/delphi-prism-first-experiment.html

You can write a program for Windows, keep GUI code and other code separate and later replace the Winforms GUI with a native Cocoa GUI on the Mac.

I found that Pascal is a good language for accessing native APIs from .NET. Everything looks cleaner than with C#, I think.

The new version of Delphi Prism is coming out on the 25th, as far as I know.



回答5:

You might also look into the GNUstep project. This will let you experience objective-c a little bit before you make the plunge, albeit with the GNU libs instead of cocoa.



回答6:

If you code in RealBasic or Lazarus, you can run and compile your apps for both Mac OS and Windows (and Linux in the case of Lazarus). RealBasic isn't that popular outside of the Mac Platform, and isn't free. Lazarus is still a little rough around the edges, but is basically a free version of Delphi.

Lazarus is working hard on a native COCOA port with the next major version of FPC (though that will probably be available only in 2011)



回答7:

Macs use Objective C. The APIs are very useful and there are many tutorials online. You'll be using Xcode, the Mac equivalent to Windows' Visual Studio and Linux's Glade.

I love making cross-platform applications. In a few hours I can prototype an application in Mac and publish it online. Then it'll take a day or two to port to Windows.



回答8:

A Mac looks expensive, but it's not if you look what you get for your money.

It is entierly up to you if you buy one or not. I guarantee you'll have a lot fun with it, next to programming. If you want a cheap Mac, just buy a Mac Mini for 500 dollars, which you can connect to the Display you already own.

I recommend doing this on Mac OS X rather than Windows, but again: it's up to you.

P.S. You can use VMWare, but I think it's slow if you have less then 4 GB RAM.



回答9:

A Mac really isn't that expensive if you go down the second hand route, I was put off by the price of brand new Macbooks so I got a late 2007 model for £350 and added an extra gig of RAM to it.

Reasonably priced, less hassle for development as well!



回答10:

If you want to have just a general feeling about ObjC and the object libraries, why not giving a try to GNUStep?

Take a look at it here:

http://wiki.gnustep.org/index.php/Main_Page