Mathieu Acthernoene 5 years ago
parent
commit
e8f0ca0172
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      ios/Permissions/RNPMediaLibrary.m

+ 2
- 3
ios/Permissions/RNPMediaLibrary.m View File

@@ -13,8 +13,7 @@
13 13
 
14 14
 + (NSString *)getStatus
15 15
 {
16
-    int status = [MPMediaLibrary authorizationStatus];
17
-    switch (status) {
16
+    switch ([MPMediaLibrary authorizationStatus]) {
18 17
         case MPMediaLibraryAuthorizationStatusAuthorized:
19 18
             return RNPStatusAuthorized;
20 19
         case MPMediaLibraryAuthorizationStatusDenied:
@@ -33,7 +32,7 @@
33 32
             completionHandler([self.class getStatus]);
34 33
         });
35 34
     };
36
-    
35
+
37 36
     [MPMediaLibrary requestAuthorization:^(MPMediaLibraryAuthorizationStatus status){
38 37
         handler();
39 38
     }];