iOS9 sendSynchronousRequest deprecated

后端 未结 7 1378
自闭症患者
自闭症患者 2020-12-24 13:15

Warning:\'sendSynchronousRequest(_:returningResponse:)\' was deprecated in iOS 9.0: Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSe

相关标签:
7条回答
  • 2020-12-24 14:05

    you can hide that warning in your project by using following code write your method between input directives and your warning goes away.

    #pragma GCC diagnostic push 
    #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
    - (void)yourMethodToCallNSURLConnection {
    //use deprecated stuff
    }
    #pragma GCC diagnostic pop
    
    0 讨论(0)
提交回复
热议问题