Bill Norman
Bill Norman

Reputation: 881

iOS: Will deprecated elements continue to work in legacy applications?

I have several iOS enterprise apps that had been developed years ago, and some of the earlier ones contain elements that Apple has deprecated, such as UIWebView.

My question is, after Apple has stopped supporting deprecated elements, will these elements continue to work in existing applications? Or will I need to go in and update the deprecated elements in all the apps in order to maintain functionality?

Upvotes: 1

Views: 490

Answers (2)

James Bucanek
James Bucanek

Reputation: 3439

When Apple deprecates an API, it means that they intend to stop supporting that API in the future.

Sometimes this is because the API is no longer useful or is flawed (creates a security hole, for example), but it's typically because it has been superseded by a superior API and Apple is encouraging you to adopt the new API.

Existing applications running on existing operating systems will, naturally, continue to function.

When Apple is replacing one API with another they will typically maintain the legacy (deprecated) API for as long as practical. So your app is likely to run on at least the next few major versions of the operating system.

Apple also tries to avoid forcing you to choose a new API because that complicates development since you now have to support two APIs in your application if you want it to be compatible with earlier versions of the OS. (Of course, if you want the features of the new API today, you don't have many choices: either support both APIs or limit the OS versions your app can run on.)

How long is on a case-by-case basis. A security flawed API might be removed in the next OS. On the other end of the scale you have string encoding APIs that have been deprecated for almost a decade (because they can't properly handle all Unicode conversion cases), yet they are still included in the framework and still function as advertised.

On high-profile classes like UIWebView, I would expect it to continue to work for years to come, but it won't be improved or get any of the new features of WKWebView. So, over time, it will look and act more and more dated. How important that is to your app is a subjective decision for your development.

Upvotes: 3

Mehroz
Mehroz

Reputation: 51

I believe it depends on the user's OS version on their device. If the OS no longer supports the deprecated elements, then you may notice an error similar to the one below: "[Appname] needs to be updated"

Upvotes: 3

Related Questions