Index: webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m |
diff --git a/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m b/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m |
index c9d029f629d13a3111daa3d46f8aa16f8d963cbe..0ae44da4be2b698547304619614dd07d142af924 100644 |
--- a/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m |
+++ b/webrtc/examples/objc/AppRTCMobile/common/ARDUtilities.m |
@@ -47,15 +47,13 @@ |
NSData *data, |
NSError *error))completionHandler { |
// Kick off an async request which will call back on main thread. |
- [NSURLConnection sendAsynchronousRequest:request |
- queue:[NSOperationQueue mainQueue] |
- completionHandler:^(NSURLResponse *response, |
- NSData *data, |
- NSError *error) { |
- if (completionHandler) { |
- completionHandler(response, data, error); |
- } |
- }]; |
+ NSURLSession *session = [NSURLSession sharedSession]; |
+ [[session dataTaskWithRequest:request |
+ completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { |
+ if (completionHandler) { |
+ completionHandler(response, data, error); |
+ } |
+ }] resume]; |
} |
// Posts data to the specified URL. |