Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

As many of you already know Apple released a new OS last week so I installed it on my system to see if the project I'm working on works. Well, absolutely nothing works! There are a lot of deprecated methods so I would like some advice on how to tackle updating your code so it is compatible with the new platform.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

A deprecated method doesn't normally just stop working; Apple are just indicating that the method is no longer the preferred way of doing things and that it might go away in a future release. Often the documentation will describe the replacement, which might be a different method (as was the case when the -[NSString cString]-style methods were deprecated in favour of methods that explicitly request a particular character encoding), or is sometimes a completely different approach (as with AuthorizationExecuteWithPrivileges(), which you should replace with Not Doing It Like That™).

Other sources of information on migrating away from deprecated API include the WWDC videos and Apple's programming guides, which offer a more high-level description of the frameworks so explain how Apple currently think they should be used. Then you could ask on stack overflow or Apple's developer forums. Finally, there's the option of buying a developer tech support incident from them and getting their engineers to suggest an alternative.

Each part of your code that touches deprecated API will need updating sooner or later, because the writing's on the wall for the deprecated methods. This is a great time to take a look at those classes affected, and ask yourself whether you just need to update how they interact with the system or whether the whole class could be approached in a better way. If you need to make changes, you may as well make the product better while you're in there.

share|improve this answer
Thx this is definitely a start –  Samantha Catania Jul 27 '11 at 15:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.