Hi guys,
I've made my first application
I coded it on my MacBook running Leopard. Then tried it on my girlfriends iBook running Tiger. It didn't work on my girlfriends Mac. If that because it's PPC, or because it's on Tiger?
Also, my program just contains windows, text boxes and buttons. Surely this is standard stuff that Tiger has too? So I could go ahead and release it for both Tiger and Leopard. And presumably make it Universal Binary too?
A few principles: First, when you build your application, you have to decide what is the lowest operating system that it will run on. Look for "Deployment Target" in your build settings. If you want the program to run on 10.4, you need to switch it to 10.4 instead of "Compiler Default" or "10.5".
Second, you have to decide which features you want to be able to use. You choose that under "Base SDK". If you match the "Deployment Target", like 10.4 SDK and 10.4 Deployment Target, then you can't use any 10.5 features, but on the other hand your code will run fine on 10.5. If you don't match them, like 10.5 SDK and 10.4 Deployment Target, then you have to be careful: You can use 10.5 features, but your code will crash if you use them on a 10.4 system.
Under "Architectures", you want to select ppc + i386; that will run on all Macs. By default, debugging versions are compiled only for your own machine, so don't give debugging versions out, but only release versions.
After reading your second post: It is the "Deployment Target" which decides where your code runs.
Deployment Target 10.4: The OS allows you to run on 10.4 Systems or newer.
Deployment Target 10.5: The OS allows you to run on 10.5 Systems or newer.
10.4 SDK: You can use 10.4 features only. If you try to use 10.5 features, it won't compile. If it compiles, it runs on 10.4 and 10.5.
10.5 SDK: You can use 10.5 features. 10.5 features work on 10.5; if you try to use them on 10.4, the program will crash.
Let's say there is a function void TenFiveFunction (void) which was introduced in 10.5.
10.4 SDK: The call will not compile.
10.5 SDK + running on 10.4: The call will compile and crash if it is executed.
10.5 SDK + running on 10.5: The call will compile and work.
Correct way to use it:
if (&TenFiveFunction == NULL) {
// The function is not available.
} else {
TenFiveFunction ();
}