Mathieu Acthernoene 5 年前
父节点
当前提交
e8f0ca0172
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2
    3
      ios/Permissions/RNPMediaLibrary.m

+ 2
- 3
ios/Permissions/RNPMediaLibrary.m 查看文件

@@ -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
     }];