From 2a122f9cddfd1759407bb115edbc9323035124ab Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 10 Feb 2021 19:00:48 +0300 Subject: Use shared URL session in the push extension --- JuickPush/NotificationService.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'JuickPush/NotificationService.m') diff --git a/JuickPush/NotificationService.m b/JuickPush/NotificationService.m index 82dead8..afeec55 100644 --- a/JuickPush/NotificationService.m +++ b/JuickPush/NotificationService.m @@ -23,7 +23,7 @@ NSURL *avatarURL = [NSURL URLWithString:request.content.userInfo[@"avatarUrl"]]; - NSURLSession * downloadSession = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + NSURLSession* downloadSession = [NSURLSession sharedSession]; [[downloadSession downloadTaskWithURL:avatarURL completionHandler:^(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error) { if (!error) { -- cgit v1.2.3