Why are there more resources available that use Xcode 3 over 4? [closed]
I'm starting to learn Xcode, and I'm finding more resources that use Xcode 3 than 4 when explaining concepts.
Does Xcode 3 have advantages over 4, or why are there so many more resources available for the former?
The fact you got more on Xcode 3 is simply due to the young age of Xcode 4 compared to the version 3 ! (Where ? not on SO !). It isn't so terrible for the moment, but you will have to upgrade to develop recently appeared features.
There is nothing wrong with using XCode 3, in fact Apple still offers a link to a recent version with iOS SDK 4.3 on the developer portal right under the XCode 4 link "Looking for Xcode 3? Download".
If you are just starting to learn Xcode, learn Xcode 4. The most recent versions of the iOS platform will only be available bundled with Xcode 4, so unless you want to cut yourself off from using the latest versions of the iOS platform (5+), there's really no choice. There are a number of flaws and limitations of 4 that are not present in 3, and many people use both, but for a new developer it's not worth the effort to learn two versions of the software. Just use 4, and wait for the support to improve.
Apple has publicly stated that the only reason they're continuing to offer Xcode 3 is because Xcode 4 can't be used to build OS X apps that target 10.4 Tiger or 10.5 Leopard. It also can't compile code for PowerPC Macs. This is all intentional, as Apple has a long-standing policy of ceasing support for legacy tech much quicker than most other OS providers. Many developers have to continue supporting legacy software on older OS's and older CPU architectures, so Xcode 3 is still being provided to facilitate this.
While there is technically nothing WRONG with Xcode 3, you will not be able to build OS X apps that target Lion or iOS apps that target 4.3+. This is important because -- also unlike a lot of other SDK providers -- when Apple marks something as "deprecated" in their developer tools, they mean it. Once a framework or method or anything of that nature becomes marked off as "deprecated", you'll have maybe one or two more version that go by before Apple removes the deprecated item from the API and your code breaks on devices that are up to date, unless you too are up to date. So by using Xcode 3 and limiting the SDK version you are allowing yourself to develop against, you run the risk of writing code that won't work in what could possibly be the very near future. Apple strives to force developers in to adopting the latest-and-greatest so that they don't have the headache of maintaining gigantic legacy API's (like Microsoft).
TL;DR:
Unless you NEED to support legacy apps on iOS versions less than 4.3 or OS X versions less than 10.6, you may as well just learn Xcode 4 now because you'll be forced in to learning it later when Apple breaks the old APIs and you have to get Xcode 4 to use the new APIs.
精彩评论