I need to build a project for iphone os 3 and 4, means i work for iphone OS 3 and 4.
What need to do?
Thanks in ad开发者_StackOverflow社区vance.
Use the latest tools, including the latest SDK, and set the deployment target to OS 3.0 (or 3.1). But there's been enough changes since then that you'll need to test on a 3.0 or 3.1 device, too.
Be careful when using frameworks and methods to check when they were made available, by reading the documentation - sometime something like MapKit will have been around since 3.0, but it has new methods you can use - just make sure to check and see if the methods are there before you call them.
One good thing to know is that 4.2 has made it easier to check for non-existant methods and classes, you used to have to weak link whole frameworks but now the compiler can do that part for you automatically:
http://www.marco.org/1648550153
精彩评论