Procházet zdrojové kódy

fix iOS 8 compling errors

Arthur Wang před 8 roky
rodič
revize
398e2c3c87

+ 2
- 2
ReactNativePermissions.xcodeproj/project.pbxproj Zobrazit soubor

@@ -225,7 +225,7 @@
225 225
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
226 226
 				GCC_WARN_UNUSED_FUNCTION = YES;
227 227
 				GCC_WARN_UNUSED_VARIABLE = YES;
228
-				IPHONEOS_DEPLOYMENT_TARGET = 9.1;
228
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
229 229
 				MTL_ENABLE_DEBUG_INFO = YES;
230 230
 				ONLY_ACTIVE_ARCH = YES;
231 231
 				SDKROOT = iphoneos;
@@ -262,7 +262,7 @@
262 262
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
263 263
 				GCC_WARN_UNUSED_FUNCTION = YES;
264 264
 				GCC_WARN_UNUSED_VARIABLE = YES;
265
-				IPHONEOS_DEPLOYMENT_TARGET = 9.1;
265
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
266 266
 				MTL_ENABLE_DEBUG_INFO = NO;
267 267
 				SDKROOT = iphoneos;
268 268
 				VALIDATE_PRODUCT = YES;

+ 4
- 1
permissions/RNPContacts.m Zobrazit soubor

@@ -59,7 +59,10 @@
59 59
 #else
60 60
     CFErrorRef error = nil;
61 61
     ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(nil, &error);
62
-    ABAddressBookRequestAccessWithCompletion(addressBook, completionHandler);
62
+    ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
63
+        NSError *err = (__bridge NSError *)error;
64
+        handler(granted, err);
65
+    });
63 66
 #endif
64 67
 }
65 68
 

+ 2
- 1
permissions/RNPPhoto.m Zobrazit soubor

@@ -7,6 +7,7 @@
7 7
 //
8 8
 
9 9
 #import "RNPPhoto.h"
10
+#import <AddressBook/AddressBook.h>
10 11
 #import <AssetsLibrary/AssetsLibrary.h>
11 12
 
12 13
 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_9_0
@@ -59,7 +60,7 @@
59 60
 #else
60 61
     ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
61 62
     [library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
62
-        handler()
63
+        handler();
63 64
         *stop = YES;
64 65
     } failureBlock:^(NSError *error) {
65 66
         handler();