Browse Source

Fix error.code cast

Mathieu Acthernoene 5 years ago
parent
commit
2cc2e87a0d
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      ios/RNPermissionsManager.m

+ 2
- 2
ios/RNPermissionsManager.m View File

@@ -221,7 +221,7 @@ RCT_REMAP_METHOD(check,
221 221
   [handler checkWithResolver:^(RNPermissionStatus status) {
222 222
     resolve([self stringForStatus:status]);
223 223
   } withRejecter:^(NSError *error) {
224
-    reject([NSString stringWithFormat:@"%ld", error.code], error.localizedDescription, error);
224
+    reject([NSString stringWithFormat:@"%ld", (long)error.code], error.localizedDescription, error);
225 225
   }];
226 226
 }
227 227
 
@@ -249,7 +249,7 @@ RCT_REMAP_METHOD(request,
249 249
 
250 250
     resolve([self stringForStatus:status]);
251 251
   } withRejecter:^(NSError *error) {
252
-    reject([NSString stringWithFormat:@"%ld", error.code], error.localizedDescription, error);
252
+    reject([NSString stringWithFormat:@"%ld", (long)error.code], error.localizedDescription, error);
253 253
   }];
254 254
 }
255 255