Skip to content

Instantly share code, notes, and snippets.

@geraintwhite
Created February 23, 2021 09:11
Show Gist options
  • Save geraintwhite/d4850c33222aa8e681fac81177be128f to your computer and use it in GitHub Desktop.
Save geraintwhite/d4850c33222aa8e681fac81177be128f to your computer and use it in GitHub Desktop.
diff --git a/node_modules/react-native-proximity/RNProximity/RNProximity.xcodeproj/project.pbxproj b/node_modules/react-native-proximity/RNProximity/RNProximity.xcodeproj/project.pbxproj
index b38f970..80cb473 100644
--- a/node_modules/react-native-proximity/RNProximity/RNProximity.xcodeproj/project.pbxproj
+++ b/node_modules/react-native-proximity/RNProximity/RNProximity.xcodeproj/project.pbxproj
@@ -105,6 +105,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 3DE4E51C1CB3E1190039D4F4;
@@ -218,6 +219,7 @@
"$(inherited)",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/node_modules/react-native/React/**",
+ "${SRCROOT}/../../../ios/Pods/Headers/**",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -232,6 +234,7 @@
"$(inherited)",
"$(SRCROOT)/../../react-native/React/**",
"$(SRCROOT)/node_modules/react-native/React/**",
+ "${SRCROOT}/../../../ios/Pods/Headers/**",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/node_modules/react-native-proximity/RNProximity/RNProximity/RNProximity.m b/node_modules/react-native-proximity/RNProximity/RNProximity/RNProximity.m
index f0f4d1c..a60c11c 100644
--- a/node_modules/react-native-proximity/RNProximity/RNProximity/RNProximity.m
+++ b/node_modules/react-native-proximity/RNProximity/RNProximity/RNProximity.m
@@ -10,6 +10,15 @@
@implementation RNProximity
+- (dispatch_queue_t)methodQueue
+{
+ return dispatch_get_main_queue();
+}
++ (BOOL)requiresMainQueueSetup
+{
+ return YES;
+}
+
@synthesize bridge = _bridge;
- (instancetype)init
diff --git a/node_modules/react-native-proximity/android/build.gradle b/node_modules/react-native-proximity/android/build.gradle
index a28f0dd..cfb5d64 100644
--- a/node_modules/react-native-proximity/android/build.gradle
+++ b/node_modules/react-native-proximity/android/build.gradle
@@ -11,13 +11,17 @@ buildscript {
apply plugin: 'com.android.library'
+def safeExtGet(prop, fallback) {
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
+}
+
android {
- compileSdkVersion 23
- buildToolsVersion "23.0.1"
+ compileSdkVersion safeExtGet('compileSdkVersion', 23)
+ buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1")
defaultConfig {
- minSdkVersion 16
- targetSdkVersion 22
+ minSdkVersion safeExtGet('minSdkVersion', 16)
+ targetSdkVersion safeExtGet('targetSdkVersion', 22)
versionCode 1
versionName "1.0"
}
@@ -31,6 +35,6 @@ repositories {
}
dependencies {
- compile 'com.facebook.react:react-native:+'
+ compile "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment