diff options
author | Vitaly Takmazov | 2021-02-10 19:00:48 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-02-10 19:00:48 +0300 |
commit | 2a122f9cddfd1759407bb115edbc9323035124ab (patch) | |
tree | b3b40eec52fbac46c9856c44afc6ab21d994b11d /JuickPush | |
parent | 24d28d8aa4383c343e4d832dc5033878218a5d93 (diff) |
Use shared URL session in the push extension
Diffstat (limited to 'JuickPush')
-rw-r--r-- | JuickPush/NotificationService.m | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |