Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch-package react-native-google-places+3.1.2.patch #303

Open
xDemon200 opened this issue Jun 27, 2022 · 3 comments
Open

patch-package react-native-google-places+3.1.2.patch #303

xDemon200 opened this issue Jun 27, 2022 · 3 comments

Comments

@xDemon200
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-google-places@3.1.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-google-places/android/.project b/node_modules/react-native-google-places/android/.project
index 3964dd3..631d67a 100644
--- a/node_modules/react-native-google-places/android/.project
+++ b/node_modules/react-native-google-places/android/.project
@@ -1,10 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>android</name>
+	<name>react-native-google-places</name>
 	<comment>Project android created by Buildship.</comment>
 	<projects>
 	</projects>
 	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 		<buildCommand>
 			<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
 			<arguments>
@@ -12,6 +17,18 @@
 		</buildCommand>
 	</buildSpec>
 	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
 		<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
 	</natures>
+	<filteredResources>
+		<filter>
+			<id>1650489151686</id>
+			<name></name>
+			<type>30</type>
+			<matcher>
+				<id>org.eclipse.core.resources.regexFilterMatcher</id>
+				<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
 </projectDescription>
diff --git a/node_modules/react-native-google-places/android/.settings/org.eclipse.buildship.core.prefs b/node_modules/react-native-google-places/android/.settings/org.eclipse.buildship.core.prefs
index e889521..1675490 100644
--- a/node_modules/react-native-google-places/android/.settings/org.eclipse.buildship.core.prefs
+++ b/node_modules/react-native-google-places/android/.settings/org.eclipse.buildship.core.prefs
@@ -1,2 +1,2 @@
-connection.project.dir=
+connection.project.dir=../../../android
 eclipse.preferences.version=1
diff --git a/node_modules/react-native-google-places/android/build.gradle b/node_modules/react-native-google-places/android/build.gradle
index e9ffd1f..8242bda 100644
--- a/node_modules/react-native-google-places/android/build.gradle
+++ b/node_modules/react-native-google-places/android/build.gradle
@@ -45,7 +45,7 @@ dependencies {
     def supportLibVersion = safeExtGet('supportLibVersion', DEFAULT_SUPPORT_LIB_VERSION)
 
     implementation "com.facebook.react:react-native:+"
-    implementation "com.google.android.libraries.places:places:1.1.0"
+    implementation 'com.google.android.libraries.places:places:2.5.0'
     implementation 'androidx.appcompat:appcompat:1.0.0'
     implementation 'androidx.legacy:legacy-support-v4:1.0.0'
     implementation "com.google.code.findbugs:jsr305:3.0.2"
diff --git a/node_modules/react-native-google-places/react-native-google-places.podspec b/node_modules/react-native-google-places/react-native-google-places.podspec
index 7445c14..9b5d949 100644
--- a/node_modules/react-native-google-places/react-native-google-places.podspec
+++ b/node_modules/react-native-google-places/react-native-google-places.podspec
@@ -18,6 +18,8 @@ Pod::Spec.new do |s|
 
   s.compiler_flags = '-DHAVE_GOOGLE_MAPS=1', '-fno-modules'
 
+  s.static_framework = true
+
   s.dependency 'React'
   s.dependency 'GooglePlaces', '~> 3.1.0'
   s.dependency 'GoogleMaps', '~> 3.1.0'

This issue body was partially generated by patch-package.

@mbrimmer83
Copy link

@xDemon200 Did you happen to fork this package? I am not sure if this is being maintained anymore. Would love to use your fork if you were able to successfully patch it and it's available.

@princefishthrower
Copy link

princefishthrower commented Sep 1, 2022

@xDemon200 - what version of react-native-maps are you using? I found for this library to be compatible I needed both the GooglePlaces and the GoogleMaps pods to be 7.0.0, but then I think I'm running into deprecation issues with the source code of this library when trying to build or run on Xcode. I mean GoogleMaps 3.1.0 is a pod from April 2019 (https://developers.google.com/maps/documentation/ios-sdk/release-notes#2019-04-16), no idea why this library is still using it. In order to use the latest version of react-native-maps on our app, we've unfortunately had to move away from using this library due to these broken compatibility issues

@danielmontgomery
Copy link

@princefishthrower Did you find a good alternative to this library? I'm running into the same issues you've mentioned. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants