ios programming What happens if an api your app uses is deprecated after your app is released?




objective c syntax (4)

immediately nothing . the deprecated api is not going to be removed from the OS .. a few years later the app might just crash on then modern OS's if you still use that function BUT AFAIK there has not been that case in IOS's short life.

A different story is when you update the Base SDK of an app and recompile it. it might be you are forced to replace that deprecated call.

If you release an app that uses an api that is later deprecated (after the release of your app), then what happens ?

What if you never update your app after it is released on the store ? Will it work with all future versions of iOS ?

Will the app still work when the api goes away in later OS versions? Or will the App Store just prevent your app from being downloaded to future OS versions ?


Answer #1

It's very difficult to say because some methods/properties which was deprecated still works. For example tableViewCell.textColor was depreciated in iOS 3 or 4 but it works. Apple tries to maintain backward compatibility with older iOS's and they allow old apps works.


Answer #2

While I've never experienced this issue with my own apps, I have seen apps in the store that have not been updated for 2+ years. A lot of these apps just crash on launch as they try to access APIs that no longer work and have piss-poor error handling built in.

I'm not sure if Apple goes and proactively removes these apps, though they obviously have that power since they own the App Store. I've also read they can do go as far as removing every installed copy on every iOS device of a specific app.

If an app gets enough negative reviews or comments that are reported as highly negative, it may get removed.


Answer #3

You asked:

If you release an app that uses an api that is later deprecated (after the release of your app), then what happens?

According to Apple, "A method identified as deprecated has been superseded and may become unsupported in the future."

So, needless to say, if your app is using an API that is deprecated at some future date, it generally will continue to work until such point Apple chooses to no longer support that API. In practice, your app will continue to function well after the API is deprecated, as Apple places a strong emphasis on backward compatibility.

If you use methods that are already flagged as deprecated at the time you release your app (or at least without doing the appropriate runtime checks for the availability of the successor method), you run a greater risk of incompatibility with forthcoming iOS versions. But if you stick with the API that is not deprecated at the time you release your app, you're unlikely to run into problems with API changes within any reasonable time span.

What if you never update your app after it is released on the store? Will it work with all future versions of iOS?

If well designed (e.g. you don't rely upon methods that were deprecated at the time you developed the app), you'll probably be safe for several iOS versions at the very least, but you have no guarantee of such. The burden rests upon the developer to ensure that the app is compatible with new versions of iOS as they're rolled out.

Frankly, apps generally date themselves well before the evolution of the API breaks it, so the level of user interest will diminish well before the API breaks it.

Will the app still work when the api goes away in later OS versions? Or will the App Store just prevent your app from being downloaded to future OS versions?

If the API is eventually retired, then obviously your app will no longer function, except in the unlikely scenario that you anticipated this and gracefully handle that situation. I don't believe that the app is automatically removed, probably only in response to user complaints.

The only automatic removal that I'm aware of is that the developer allows their paid developer's license to lapse. In that scenario, the app is removed from the store immediately.


As an aside, you have focused solely on API differences. Another source of problems are those apps that rely upon some undocumented iOS idiosyncrasy for the successful operation of the app. If you stick to standard, documented API calls, you should be fine. But if you have some feature that you only got to work employing some kludgy work-around discovered experimentally, but not found in the official documentation, then that's a warning sign that your app might not be very "future-proof" and may well break upon future iOS releases.





objective-c