Mac OS X Development - windows

I would love to begin developing applications for the MAC OS X, although I have to idea where to start.
Problem: I currently do not, and cannot afford a new MAC OS X-based computer.
Solution: A very good friend loves trying out things that I've made for Windows, and also owns a MAC OS X computer, and is willing to test these new creations.
Now I am faced with another problem. I don't know which language to use to develop these apps in. I am a .NET Developer and seeing as though I can only use a Windows based PC to develop MAC apps, where should I start?
I've heard of Mono, and have used it on Linux before, would Mono be an option for MAC development on a Windows based computer, too? Are there any other ways around this?
Any help is appreciated. :)
Thank you
jt

You could start with a cross platform language like Java, Python or Ruby. The applications you write this way either work immediately on OSX or need only little adjustments. I work with Java to develop for OSX, windows and linux. Java is not too different from C# and comes completely free. With some extra work Java applications can look like native OSX or windows or linux.
But this way you don't get any of the special features of OSX. For these you do need the OSX environment objective-c and cocoa.

If you don't want your applications to be total shite that makes me cry, then buy a Mac and start reading and learning about what makes a high quality Mac OS X application. The standards for quality are much higher on this side of the river, you'll soon see.

You need to have MacOS X and use Xcode with Objective C; this is the native environment, and you won't be able to appreciate MacOS X UX without using it. You may be able to install MacOS X on a PC, although this isn't approved or supported by Apple.
Just don't take half measures, it isn't worth it.

Sorry for this late answer, but I am having the same problem.
After looking around, I have seen people be able to install OS X 10.6 (Snow Leopard) on their Windows 7 computers using a virtual machine. Maybe this website from lifehacker may help:
http://lifehacker.com/5583650/run-mac-os-x-in-virtualbox-on-windows
These people tell you how to install Snow Leopard. You may not install Xcode 4.33 on Snow Leopard, but it's worth a try. There also may be places where they show you how to install Lion itself onto their PC's, but Lifehacker has the most straightforward tutorials.
Hope this helps!

All the other answers are good. You need OS X and XCode. Since,at the moment you can't afford a Mac machine and seeing how the language of choice for both OS X and iOS is objective-c, you could start with learning C programming on windows. Objective-C is a superset of C. Knowing C Langauge will speed up your learning curve once you can afford to buy Mac. (or you might decide that C pointers are just too hard and save some money)
Also google how to create a hackintosh. I've seen couple articles on lifehacker on how to do it. It's not ideal but perhaps it would allow you to run XCode and create apps for iPhone or iPad.

Related

How do I code applications on a Mac so that they use the native UI elements?

I'm starting to program. Already did some things with Java: a calculator, one document management system powered with a database and some other home projects. But I don't like the visual look. I love however how mi Mac's Apps look. And I want to create Apps for mac. Already buy one but when I open netbeans to program it looks like the Apps doesn't feel like mac.
Is there any specific java code to make the controls looks like how the other mac apps look? My dad mention something about Object C but I don't understand. Can someone please explain me.
AFAIK You'll never get the look and feel of Aqua (Mac's UI Kit) by using Java. Why? Because to make Java platform independent some things needs to get ripped off. And native controls are one of them.
I think you're taking about Objective C which is the native development language for building Mac Apps. I'll recommend you the book "Learn Objective-C on the Mac" is pretty useful.
P.S. I'll encourage you to start with iOS (iPhone and iPad apps). Why? Well, I think is easier to begin with. Things like fixed resolution and so on make your development efforts small while beginning with. (Just my 2 cents)
If you want to code in Objective-C, you'll first need to trek over to the App Store and download Xcode. This will install C/C++/Objective-C compilers on your Mac and then you can start getting your hands dirty.
Depending on what you are trying to accomplish, you can just google/read/learn and build your own frameworks from the ground up or look at something like Cocoa to get started as well.
http://developer.apple.com/technologies/mac/cocoa.html
Cocoa Frameworks
The Cocoa frameworks consist of libraries, APIs, and runtimes that form the development layer for all of Mac OS X. By developing with Cocoa, you will be creating applications the same way Mac OS X itself is created. Your application will automatically inherit the great behaviors and appearances of Mac OS X, with full access to the underlying power of the UNIX operating system. Using Cocoa with the Xcode IDE is simply the best way to create native Mac applications.
Good luck!
Apple has deprecated a lot of the Java support in OS X. It's possible to have a Java application integrated, but there are some annoying bits missing. See one of my questions demonstrating some issues with Java applications in the Dock. You would be better off using Objective-C instead, since Apple has lots of documentation and tutorials available.
You're thinking of Objective C. You can also do applications for Mac using C/C++ but as of late the "popular" language for Mac development is Objective-C. There are tons of tutorials and plenty of documentation to walk you through writing apps for both Mac and iOS.

Open source tools for testing purpose in Mac OS X

Currently i am using Mac OS X 10.6.4 and i want to know what are the tools(automated & manual) that i can install in my mac for testing purpose.Generally i need this for different kind of Website & Mobile platform testing.
There are plenty of open source tools for testing. Many are cross platform and will work on Mac.
Specifically, I recall watching the demo of Project Sikuli which looks very innovative and simple to use. It is work in progress, though.
Ottomate is one that I saw seemed pretty interesting. It might only be for Safari though unfortunately. Eggplant is another one as well. I'm trying to find a solution to this problem as well.

Developing for Mac OS X, on Windows?

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? :-)
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!
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
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.
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.
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.
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)
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.
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.
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!
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

Using Mac for development

I see that more and more are using Macs for development.
Why is this? What advantages does the mac have?
Except for the obvious Microsoft languages, are there any that are not suitable for the mac?
And last, what is a recommended, not so pricey macbook for programming (C++, Java, Ruby, Haskell etc.)?
A mac is Unix based and more user friendly than most Linux distrib. They also have a nice set of software. Another reason could be that you can only develop for iphone on a mac (objective C).
I've been developing with a Mac for the past 4 years and never ran into issues (or at least, not more issues than on a PC). I've been developing in Ruby, PHP, C, C++, Ada, Java... I think that all the languages will work just fine, aside from Microsoft technologies such as .NET... but then you can get parallels, VMWare or bootcamp to bypass this.
You can get a Macbook for 1000$... it's still expensive, but totally worth it.
(source: akamai.net)
I already answered a bit to this question here.
The Mac is also very nice for web development. It is very easy to set up a local development environment as PHP, MySQL (I think; if not there's an easy installer), and Apache come preinstalled. There is a lot of nice web development software for the Mac, such as Coda, CSSEdit, and TextMate.
As for software:
C++: Use Xcode. It's quite nice (though I hear it won't win many converts from Visual Studio. Having never used VS I can't comment on that).
Java: Use Eclipse. But then, you probably already knew that.
Ruby/Haskell: Textmate!
Also, for GHC, install MacPorts and use that to install your haskell compiler.
Lastly, don't pay Apple's prices for RAM upgrades. You can buy standard RAM from any supplier for much less.
Any currently shipping Macintosh will be adequate for development (Mac Mini, Low end MacBook Pro) if you are a hobbyist or have small projects.
I find a 2.53Ghz MacBook Pro fine for my weekend projects, iPhone development and script hacking. For my Day job I'd have a hard time getting by with less than a top end Mac Pro with much less modest specs.
I do .NET development regularly on my macbook pro using Parallels. The performance hit is noticeable but not enough to matter most of the time. The worst part for me is the inconsistency in moving the cursor around in applications using the keyboard (CMD + left/right, etc). I don't know if it's from me messing around with Parallels keyboard binding settings or not, but even after 6 months, I still don't know the different shortcuts as well as I do in Windows.
Mac is intensely used by designers with photoshop, ilustrator or after effects.
Also there are more and more objective c programmers which develop iphone apps.
I believe that because the only eligible way to create iphone apps is to own a mac, developers were forced somehow to buy mac in their way to create apps.

How can a Windows programmer be sufficiently productive on Mac OS X?

I've been using MacBook Pro for a few months at home, and I was wondering if there's a good book or guide that can help me be a better programmer on Mac. Maybe Mac-equivalent of Beginning Linux Programming. Note I am not looking for resource on how to program Mac application, instead I am looking for more general guide of using Mac for general development environment.
As a background, I am a Windows programmer by day. I've also done some Linux and BSD over the years, esp in school, like socket programming, graphics, make install type stuff. At home, I'll be doing Java, Scala, PHP, etc. on Mac.
So far, I've been using Eclipse, QuickSilver, and TextMate. VMWare Fusion, XCode and NetBeans are set up, but I don't use them. A DVI KVM switch is hooked up to real keyboard, trackball, and monitor. Recently stayed up till late fighting with MacPorts, and figured out I needed x86_64. The most struggle I had was configuring PHP. I don't know why they don't ship with MySQL and GD library. I eventually figured it out Googling around, and built the extensions from source. I have a feeling that I didn't get the memo and didn't read some basic guide on how to become a programmer on Mac, like how the whole architecture works. How can a Windows programmer be sufficiently productive on Mac OS X?
Related: Setting up a Mac for programmers
Edit: The specific type of application I want to develop doesn't really matter in my opinion. It could be Java, Scala, PHP as I mentioned or Cocoa, C++, or whatever.
What I am looking for is specific book, resource, advice on how to be more effective programmer on Mac, preferably something beyond "install XYZ".
Having converted from Windows to Mac OS X about five years ago, I often find myself thinking the same thing. I just cannot be productive on Windows (as much, I can be productive) as I can on Mac OS X.
To be honest, there are lots of small differences between Mac OS X and Windows. I find the biggest reason for people thinking like this (at it normally only applies to gamers and developers) is that they are trying to use the Mac like a Windows machine. You need to learn to accept that you have to use the command key, not the control key, etc.
It sounds like you are using a Mac because you have to as opposed to because you want to. It really is a much better platform than Windows once you get used to it.
I think a lot of Windows programmers come to Mac and don't try to learn it properly because they are complacent thinking they know it all because they have "used Windows all their life". I guess once you discover Spotlight, Expose, Mac OS X Keyboard shortcuts, etc. You will find your self being MUCH more productive that you ever were on Windows.... and its actually a fun OS to use.
Checkout some of the best Mac applications you can get here and here. You can also do a search for "top 100 mac apps".
Also, I noticed you were trying to setup some kind of web server directly into Mac OS X. It does ship with one, but if you are going to add MySQL and some other extensions I wouldn't go the MacPorts route. Get VMWare Fusion or VirtualBox (open source) and run the server in a VM. Much cleaner. I have a subversion/trac FreeBSD VM that handles my local version control.
I would like to add that if you don't presently use Xcode, you should definitely learn it and use it asap. It's a much nicer IDE to use than Visual Studio and it will make your life much easier.
Don't forget you have probably spent years on Windows help sites, you're going to a small degree need to do that with the Mac. Whenever you have a problem about using the Mac, ask a question on ServerFault. We are all more than eager to help you out.
Good luck.
You seem to want an overview of how Mac OS X works at a system level, more than recomenations about tools and so forth. If that's the case, I'd start with the (very basic) Mac OS X System Architecture Guide from Apple, then move on to Getting Started with Mac OS X, which should give you enough of an overview to get started.
It's not clear from your question what you intend to actually make with your programming time, but if you decide to persue Cocoa/OS X development, I recommend Cocoa Programming for Mac OS X by Aaron Hillegass.
I have a similar situation like yours. I use Windows for development and about a year back purchased a MBP for home (as I shifted to an office). I find it really difficult to get any real work done on my MBP. Somehow am used to the Windows environment with dual screens. But let that not stop you. A couple of software which I suggest you should get are:
Transmit - Good ftp client
MAMP - Runs a webserver nearly out-of-the-box. Good for basic development
Quicksilver - Helps in quick finding of applications
Spaces along with gestures (Configure your gestures to move from one screen to another, I use three fingers glide. its amazing)
Entourage - for email
Terminal - for ssh (putty alternative) (included)
Dreamweaver/BBedit/Textmate (all pretty decent. but i love editplus on windows. not a fan of IDE)
I assume your question is not about learning COCOA and more about being more effective using a MAC. Well, the above tools might help you.
Unfortunately, your question isn't very clear as to what you really want.
If you're looking to write anything cross-platform, it can be very helpful to have a virtual machine for testing. When in Linux, I've always used VirtualBox, and it works on OS X as well.
Also, as for choice of IDE, a lot of it comes down to your preference. Eclipse is nice because there's a plugin for almost everything for it. My experience with TextMate is limited, but my local Ruby Users Group swears by it.
Finally, a suggestion for not just Mac, but any platform really. Learn your hotkeys, set up new ones for things you commonly do, and use them frequently. Not having to take your hands off the keyboard to click a mouse through a few menus can really improve productivity. It may take a little time for them to grow on you, but once they become second nature, you'll wonder how you lived without them.
Basically, you can apply all your Linux/UNIX knowledge that you already have to the Mac. If you use the Terminal (/Applications/Utilities/Terminal.app) you can run all your favorite UNIX commands. Mac has a special command called "open" which is equivalent to the Windows "start" command (used to launch programs and files). You can also use "open -a" to open an application by name (e.g. "open -a Finder").
You might want to reconsider Xcode. Xcode opens more quickly than Eclipse and provides very good syntax highlighting, brace matching, block indenting, and more. Xcode doesn't have to be used as an IDE, you can also use it as a code editor, just like you are currently using TextMate.
For code editing (and everything else), try Aquamacs (http://www.aquamacs.org). It's a Cocoa-native build of Emacs, and it's brilliant for any programming task.

Resources