tolu360 / react-native-google-places

iOS/Android Google Places Widgets (Autocomplete Modals) and API Services for React Native Apps
567 stars 289 forks source link

RNGooglePlaces.openAutocompleteModal() not working, the modal itself is not getting opened #263

Closed AlfBohra closed 4 years ago

AlfBohra commented 5 years ago

Package.json "react": "16.8.6", "react-native": "0.60.5", "react-native-google-places": "^3.1.2", "react-native-maps": "^0.25.0"

Podfile: rn_path = '../node_modules/react-native' rn_maps_path = '../node_modules/react-native-maps' pod 'react-native-maps', path: rn_maps_path pod 'react-native-google-maps', path: rn_maps_path
pod 'GoogleMaps' pod 'Google-Maps-iOS-Utils' pod 'GooglePlaces' pod 'GooglePlacePicker' pod 'react-native-google-places', :path => '../node_modules/react-native-google-places'

post_install do |installer| installer.pods_project.targets.each do |target| if target.name == 'react-native-google-places' target.build_configurations.each do |config| config.build_settings['CLANG_ENABLE_MODULES'] = 'No' end end if target.name == "React" target.remove_from_project end end end

Usage:

import RNGooglePlaces from 'react-native-google-places';

RNGooglePlaces.openAutocompleteModal().then((place) => { console.log(place); // not getting logged }) .catch(error => { console.log(error.message); // not getting logged });

So basically, if I call some other method method like RNGooglePlaces.getCurrentPlace() it works, but RNGooglePlaces.openAutocompleteModal() does not open a modal and does not resolve promise.

Please help me resolve this.

AlfBohra commented 5 years ago

Please help.