arashpayan / appirater

A utility that reminds your iPhone app's users to review the app.

Home Page:http://arashpayan.com/blog/2009/09/07/presenting-appirater/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning regarding NSURLConnection

dacoinminster opened this issue · comments

I'm getting a warning on Appirater.m after upgrading to the latest xcode (xcode 8.0.0 gold master):

'initWithRequest:delegate:' is deprecated: first deprecated in iOS 9.0 - Use NSURLSession (see NSURLSession.h)

I'm using an older version of this code, but the problem appears to still exist in the latest version of Appirater.m on line 250:

NSURLConnection *testConnection = [[NSURLConnection alloc] initWithRequest:testRequest delegate:self];

It appears that this line is simply testing if it is possible to create a new request, without looking at the response at all, so I'm not sure how important it is, or whether it is important to take Apple's advice and switch to NSURLSession or not.

In my version of this code, I have told the compiler to ignore this error (#pragma clang diagnostic ignored "-Wdeprecated-declarations") with a push and a pop to make it specific to that one line, but I thought I should create an issue too in case you are able to fix it.

Thanks!

Hi @dacoinminster. If you could send a pull request that either replaces NSURLConnection or simply suppresses it with a pragma, I'll happily accept it. I simply don't have much time to work on Appirater anymore.

Pull request opened to try to solve this

Fixed by pull #244