Andrew Duncan Andrew Duncan - 9 months ago 46
iOS Question

When will NSURLConnection be rejected? (Not just deprecated)

I have an app I wish to submit soon, and I don't have the time to rewrite any code. It uses

because when it was first written, that was used in Apple's demo code. (And still is last I looked.)

I understand that it is deprecated in favor of
but it will be a wrenching pull-up-the-guts to rewrite. Can I avoid it for one more OS?


tl;dr - It will probably never lead to a rejection.

NSURLConnection was only deprecated since iOS 9.0. Don't even think about it until your app's Deployment Target is iOS 9.0 or later.

Even if your Deployment Target is already iOS 9.0 or later, it is still safe to use.

There are APIs deprecated since iOS 2.0 that can still be used.

There are many, many thousands of apps in the App Store that haven't been updated in years that still use NSURLConnection. Those apps will continue to work for several years to come.

There have been extremely few deprecated APIs over the years that don't still work several iOS versions later.

I'd feel safe using NSURLConnection for a few more years if required. But plan on replacing its use in the next year. Its replacement is much better.