Procházet zdrojové kódy

Fix error.code cast

Mathieu Acthernoene před 6 roky
rodič
revize
2cc2e87a0d
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2
    2
      ios/RNPermissionsManager.m

+ 2
- 2
ios/RNPermissionsManager.m Zobrazit soubor

@@ -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