├── .gitignore
├── .npmignore
├── LICENSE.md
├── Podfile.template
├── README.md
├── android
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── reactlibrary
│ ├── RNGooglePlacePickerModule.java
│ └── RNGooglePlacePickerPackage.java
├── bin
├── cocoapods.sh
└── prepare.sh
├── example
├── .buckconfig
├── .flowconfig
├── .gitignore
├── .watchmanconfig
├── WelcomeScreen.js
├── android
│ ├── app
│ │ ├── BUCK
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── keystores
│ │ ├── BUCK
│ │ └── debug.keystore.properties
│ └── settings.gradle
├── index.android.js
├── index.ios.js
├── ios
│ ├── Podfile
│ ├── Podfile.lock
│ ├── example.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── example.xcscheme
│ ├── example.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── example
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj
│ │ │ └── LaunchScreen.xib
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── Info.plist
│ │ └── main.m
│ └── exampleTests
│ │ ├── Info.plist
│ │ └── exampleTests.m
└── package.json
├── index.js
├── ios
├── RNGooglePlacePicker.h
├── RNGooglePlacePicker.m
└── RNGooglePlacePicker.xcodeproj
│ └── project.pbxproj
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # CocoaPods
26 | Pods/
27 |
28 |
29 | # Android/IJ
30 | #
31 | .idea
32 | .gradle
33 | local.properties
34 |
35 | # node.js
36 | #
37 | node_modules/
38 | npm-debug.log
39 |
40 | # BUCK
41 | buck-out/
42 | \.buckd/
43 | android/app/libs
44 | android/keystores/debug.keystore
45 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | example
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Jack Chang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Podfile.template:
--------------------------------------------------------------------------------
1 |
2 | # react-native-google-place-picker dependencies
3 |
4 | pod 'GooglePlacePicker', '= 2.0.1'
5 | pod 'GooglePlaces', '= 2.0.1'
6 | pod 'GoogleMaps', '= 2.0.1'
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # react-native-google-place-picker [](https://badge.fury.io/js/react-native-google-place-picker)
3 |
4 | React Native Wrapper of Google Place Picker for iOS + Android.
5 |
6 | iOS | Android
7 | ------- | ----
8 |
|
9 |
10 | ## Table of contents
11 | - [Install](#install)
12 | - [iOS](#ios)
13 | - [Android](#android)
14 | - [Usage](#usage)
15 | - [Example](#example)
16 | - [Response object](#the-response-object)
17 |
18 | ## Install
19 |
20 | `npm install react-native-google-place-picker --save`
21 |
22 | Then you must install the native dependencies. You can use `rnpm` (now part of `react-native` core) to add native dependencies automatically:
23 |
24 | `react-native link`
25 |
26 | or link manually like so:
27 |
28 | #### iOS
29 |
30 | 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
31 | 2. Go to `node_modules` ➜ `react-native-google-place-picker` and add `RNGooglePlacePicker.xcodeproj`
32 | 3. In XCode, in the project navigator, select your project. Add `libRNGooglePlacePicker.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
33 | 4. Inside your `ios` directory add a file named `Podfile` with the following [content](https://github.com/q6112345/react-native-google-place-picker/blob/master/Podfile.template)
34 | 6. Run `pod install --project-directory=ios` in the project root path.
35 | 7. At the top of your `AppDelegate.m`:
36 |
37 | ```objc
38 | #import
39 | #import
40 | ```
41 | And then in your AppDelegate implementation, Add the following to your application:didFinishLaunchingWithOptions, replace `YOUR_API_KEY`:
42 |
43 | ```
44 | NSString *kAPIKey = @"YOUR_API_KEY";
45 | [GMSPlacesClient provideAPIKey:kAPIKey];
46 | [GMSServices provideAPIKey:kAPIKey];
47 | ```
48 |
49 | 8. Run `react-native run-ios`
50 |
51 | #### Android
52 |
53 | 1. Open up `android/app/src/main/java/[...]/MainActivity.java`
54 | - Add `import com.reactlibrary.RNGooglePlacePickerPackage;` to the imports at the top of the file
55 | - Add `new RNGooglePlacePickerPackage()` to the list returned by the `getPackages()` method
56 | 2. Append the following lines to `android/settings.gradle`:
57 |
58 | ```groovy
59 | include ':react-native-google-place-picker'
60 | project(':react-native-google-place-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-place-picker/android')
61 | ```
62 |
63 | 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
64 |
65 | ```groovy
66 | compile project(':react-native-google-place-picker')
67 | ```
68 |
69 | 4. Add permisson and your `YOUR_API_KEY` to your manifest file:
70 |
71 | ```xml
72 |
76 |
77 | ...
78 |
79 |
80 |
81 | ...
82 |
83 |
84 |
85 | ...
86 |
87 |
90 |
91 | ...
92 |
93 |
94 |
95 | ```
96 |
97 | ## Usage
98 | ```javascript
99 | import RNGooglePlacePicker from 'react-native-google-place-picker';
100 |
101 | RNGooglePlacePicker.show((response) => {
102 | if (response.didCancel) {
103 | console.log('User cancelled GooglePlacePicker');
104 | }
105 | else if (response.error) {
106 | console.log('GooglePlacePicker Error: ', response.error);
107 | }
108 | else {
109 | this.setState({
110 | location: response
111 | });
112 | }
113 | })
114 | ```
115 | ### Example
116 | * A fully working [example](https://github.com/q6112345/react-native-google-place-picker/tree/master/example)
117 |
118 | ### The Response Object
119 |
120 | key | type | Description
121 | --- | --- | ---
122 | didCancel | boolean | Informs you if the user cancelled the process
123 | error | string | Contains an error message, if there is one
124 | address | string/null | The formated address of selected location, null if not available
125 | name | string | The name of this Place
126 | google_id | string | The unique id of this Place
127 | latitude | number | The latitude value of selected location
128 | longitude | number | The longitude value of selected location
129 |
130 | ### Credits
131 | Thanks following repositories' inspiration/help:
132 |
133 | * [react-native-create-library](https://github.com/frostney/react-native-create-library)
134 | * [react-native-image-picker](https://github.com/marcshilling/react-native-image-picker)
135 | * [react-native-maps](https://github.com/lelandrichardson/react-native-maps)
136 | * [react-native-lock](https://github.com/auth0/react-native-lock)
137 |
138 |
139 | ### License
140 |
141 | Code in this git repo is licensed MIT.
142 |
143 | [](https://dartnode.com "Powered by DartNode - Free VPS for Open Source")
144 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | apply plugin: 'com.android.library'
3 |
4 | android {
5 | compileSdkVersion 23
6 | buildToolsVersion "23.0.1"
7 |
8 | defaultConfig {
9 | minSdkVersion 16
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.0"
13 | ndk {
14 | abiFilters "armeabi-v7a", "x86"
15 | }
16 | }
17 | lintOptions {
18 | warning 'InvalidPackage'
19 | }
20 | }
21 |
22 | dependencies {
23 | compile 'com.facebook.react:react-native:+'
24 | compile 'com.google.android.gms:play-services-places:+'
25 | }
26 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/src/main/java/com/reactlibrary/RNGooglePlacePickerModule.java:
--------------------------------------------------------------------------------
1 |
2 | package com.reactlibrary;
3 |
4 | import android.app.Activity;
5 | import android.widget.Toast;
6 | import android.content.Intent;
7 |
8 |
9 | import com.facebook.react.bridge.ActivityEventListener;
10 | import com.facebook.react.bridge.Arguments;
11 | import com.facebook.react.bridge.Callback;
12 | import com.facebook.react.bridge.ReactApplicationContext;
13 | import com.facebook.react.bridge.ReactContextBaseJavaModule;
14 | import com.facebook.react.bridge.ReactMethod;
15 | import com.facebook.react.bridge.WritableMap;
16 |
17 |
18 | import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
19 | import com.google.android.gms.common.GooglePlayServicesRepairableException;
20 | import com.google.android.gms.common.GooglePlayServicesUtil;
21 | import com.google.android.gms.location.places.Place;
22 | import com.google.android.gms.location.places.ui.PlacePicker;
23 | import com.google.android.gms.maps.model.LatLng;
24 |
25 |
26 | public class RNGooglePlacePickerModule extends ReactContextBaseJavaModule implements ActivityEventListener {
27 |
28 | private final ReactApplicationContext reactContext;
29 | private Callback mCallback;
30 | WritableMap response;
31 | private static final int REQUEST_PLACE_PICKER = 1;
32 |
33 |
34 | public RNGooglePlacePickerModule(ReactApplicationContext reactContext) {
35 | super(reactContext);
36 | reactContext.addActivityEventListener(this);
37 | this.reactContext = reactContext;
38 | }
39 |
40 | @Override
41 | public String getName() {
42 | return "RNGooglePlacePicker";
43 | }
44 |
45 | @ReactMethod
46 | public void show(final Callback callback) {
47 | Activity currentActivity = getCurrentActivity();
48 | if (currentActivity == null) {
49 | response.putString("error", "can't find current Activity");
50 | callback.invoke(response);
51 | return;
52 | }
53 | try {
54 | PlacePicker.IntentBuilder intentBuilder = new PlacePicker.IntentBuilder();
55 | Intent intent = intentBuilder.build(currentActivity);
56 | mCallback = callback;
57 | currentActivity.startActivityForResult(intent, REQUEST_PLACE_PICKER);
58 | } catch (GooglePlayServicesRepairableException e) {
59 | response = Arguments.createMap();
60 | response.putString("error", "GooglePlayServicesRepairableException");
61 | callback.invoke(response);
62 | GooglePlayServicesUtil
63 | .getErrorDialog(e.getConnectionStatusCode(), currentActivity, 0);
64 | } catch (GooglePlayServicesNotAvailableException e) {
65 | response = Arguments.createMap();
66 | response.putString("error", "Google Play Services is not available.");
67 | callback.invoke(response);
68 | Toast.makeText(currentActivity, "Google Play Services is not available.",
69 | Toast.LENGTH_LONG)
70 | .show();
71 | }
72 | }
73 |
74 | // removed @Override temporarily just to get it working on different versions of RN
75 | public void onActivityResult(final Activity activity, final int requestCode, final int resultCode, final Intent data) {
76 | if (mCallback == null || requestCode != REQUEST_PLACE_PICKER) {
77 | return;
78 | }
79 | response = Arguments.createMap();
80 | if (resultCode == 2) {
81 | response.putString("error", "Google Maps not setup correctly. Did you forget the API key, or enabling the Places API for Android?");
82 | mCallback.invoke(response);
83 | } else if (resultCode == Activity.RESULT_OK) {
84 | final Place place = PlacePicker.getPlace(data, reactContext);
85 | final CharSequence address = place.getAddress();
86 | final LatLng coordinate = place.getLatLng();
87 | final CharSequence name = place.getName();
88 | final CharSequence id = place.getId();
89 | response.putString("address", address.toString());
90 | response.putDouble("latitude", coordinate.latitude);
91 | response.putDouble("longitude", coordinate.longitude);
92 | response.putString("name", name.toString());
93 | response.putString("google_id", id.toString());
94 | mCallback.invoke(response);
95 | } else {
96 | response.putBoolean("didCancel", true);
97 | mCallback.invoke(response);
98 | return;
99 | }
100 | }
101 |
102 | // removed @Override temporarily just to get it working on different versions of RN
103 | // Ignored, required to implement ActivityEventListener for RN < 0.33
104 | public void onActivityResult(int requestCode, int resultCode, Intent data) {
105 | this.onActivityResult(null, requestCode, resultCode, data);
106 | }
107 |
108 | /**
109 | * Called when a new intent is passed to the activity
110 | */
111 | @Override
112 | public void onNewIntent(Intent intent){
113 | // ToDo
114 | }
115 |
116 | }
117 |
--------------------------------------------------------------------------------
/android/src/main/java/com/reactlibrary/RNGooglePlacePickerPackage.java:
--------------------------------------------------------------------------------
1 |
2 | package com.reactlibrary;
3 |
4 | import java.util.Arrays;
5 | import java.util.Collections;
6 | import java.util.List;
7 |
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.react.bridge.NativeModule;
10 | import com.facebook.react.bridge.ReactApplicationContext;
11 | import com.facebook.react.uimanager.ViewManager;
12 | import com.facebook.react.bridge.JavaScriptModule;
13 |
14 | public class RNGooglePlacePickerPackage implements ReactPackage {
15 | @Override
16 | public List createNativeModules(ReactApplicationContext reactContext) {
17 | return Arrays.asList(new RNGooglePlacePickerModule(reactContext));
18 | }
19 |
20 | //@Override
21 | public List> createJSModules() {
22 | return Collections.emptyList();
23 | }
24 |
25 | @Override
26 | public List createViewManagers(ReactApplicationContext reactContext) {
27 | return Collections.emptyList();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/bin/cocoapods.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ios_dir=`pwd`/ios
4 | if [ -d ios_dir ]
5 | then
6 | exit 0
7 | fi
8 |
9 | podfile="$ios_dir/Podfile"
10 | template=`pwd`/node_modules/react-native-google-place-picker/Podfile.template
11 |
12 | echo "Checking Podfile in iOS project ($podfile)"
13 |
14 | if [ -f $podfile ]
15 | then
16 | echo ""
17 | echo "Found an existing Podfile, Do you want to override it? [N/y]"
18 | read generate_env_file
19 |
20 | if [ "$generate_env_file" != "y" ]
21 | then
22 | echo "Add the following pods":
23 | echo ""
24 | echo ""
25 | cat $template
26 | echo ""
27 | echo ""
28 | echo "and run 'pod install' to install react-native-google-place-picker dependencies for iOS"
29 | exit 0
30 | fi
31 |
32 | rm -f $podfile
33 | rm -f "$podfile.lock"
34 | fi
35 |
36 | echo "Adding Podfile to iOS project"
37 |
38 | cd ios
39 | pod init >/dev/null 2>&1
40 | cat $template >> $podfile
41 | cd ..
42 |
43 | echo "Installing Pods"
44 |
45 | pod install --project-directory=ios
--------------------------------------------------------------------------------
/bin/prepare.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Preparing to link react-native-google-place-picker for iOS"
4 |
5 | echo "Checking CocoaPods..."
6 | has_cocoapods=`which pod >/dev/null 2>&1`
7 | if [ -z "$has_cocoapods" ]
8 | then
9 | echo "CocoaPods already installed"
10 | else
11 | echo "Installing CocoaPods..."
12 | gem install cocoapods
13 | fi
--------------------------------------------------------------------------------
/example/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/example/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 |
3 | # We fork some components by platform.
4 | .*/*[.]android.js
5 |
6 | # Ignore templates with `@flow` in header
7 | .*/local-cli/generator.*
8 |
9 | # Ignore malformed json
10 | .*/node_modules/y18n/test/.*\.json
11 |
12 | # Ignore the website subdir
13 | /website/.*
14 |
15 | # Ignore BUCK generated dirs
16 | /\.buckd/
17 |
18 | # Ignore unexpected extra @providesModule
19 | .*/node_modules/commoner/test/source/widget/share.js
20 |
21 | # Ignore duplicate module providers
22 | # For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
23 | .*/Libraries/react-native/React.js
24 | .*/Libraries/react-native/ReactNative.js
25 | .*/node_modules/jest-runtime/build/__tests__/.*
26 |
27 | [include]
28 |
29 | [libs]
30 | node_modules/react-native/Libraries/react-native/react-native-interface.js
31 | node_modules/react-native/flow
32 | flow/
33 |
34 | [options]
35 | module.system=haste
36 |
37 | esproposal.class_static_fields=enable
38 | esproposal.class_instance_fields=enable
39 |
40 | experimental.strict_type_args=true
41 |
42 | munge_underscores=true
43 |
44 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
45 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
46 |
47 | suppress_type=$FlowIssue
48 | suppress_type=$FlowFixMe
49 | suppress_type=$FixMe
50 |
51 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
53 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
54 |
55 | unsafe.enable_getters_and_setters=true
56 |
57 | [version]
58 | ^0.30.0
59 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IJ
26 | #
27 | *.iml
28 | .idea
29 | .gradle
30 | local.properties
31 |
32 | # node.js
33 | #
34 | node_modules/
35 | npm-debug.log
36 |
37 | # BUCK
38 | buck-out/
39 | \.buckd/
40 | android/app/libs
41 | android/keystores/debug.keystore
42 |
--------------------------------------------------------------------------------
/example/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/example/WelcomeScreen.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import {
3 | StyleSheet,
4 | Text,
5 | View,
6 | TouchableOpacity
7 | } from 'react-native';
8 | import RNGooglePlacePicker from 'react-native-google-place-picker';
9 |
10 | export default class WelcomeScreen extends Component {
11 | constructor(props) {
12 | super(props);
13 | this.state = {
14 | location: null
15 | }
16 | }
17 |
18 | onPress() {
19 | RNGooglePlacePicker.show((response) => {
20 | if (response.didCancel) {
21 | console.log('User cancelled GooglePlacePicker');
22 | }
23 | else if (response.error) {
24 | console.log('GooglePlacePicker Error: ', response.error);
25 | }
26 | else {
27 | this.setState({
28 | location: response
29 | });
30 | }
31 | })
32 | }
33 |
34 | render() {
35 | return (
36 |
37 |
38 |
39 | Click me to push Google Place Picker!
40 |
41 |
42 |
43 |
44 | {JSON.stringify(this.state)}
45 |
46 |
47 |
48 | );
49 | }
50 | }
51 |
52 | const styles = StyleSheet.create({
53 | container: {
54 | flex: 1,
55 | justifyContent: 'center',
56 | alignItems: 'center',
57 | backgroundColor: '#F5FCFF',
58 | },
59 | location: {
60 | backgroundColor: 'white',
61 | margin: 25
62 | }
63 | });
--------------------------------------------------------------------------------
/example/android/app/BUCK:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | # To learn about Buck see [Docs](https://buckbuild.com/).
4 | # To run your application with Buck:
5 | # - install Buck
6 | # - `npm start` - to start the packager
7 | # - `cd android`
8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10 | # - `buck install -r android/app` - compile, install and run application
11 | #
12 |
13 | lib_deps = []
14 | for jarfile in glob(['libs/*.jar']):
15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16 | lib_deps.append(':' + name)
17 | prebuilt_jar(
18 | name = name,
19 | binary_jar = jarfile,
20 | )
21 |
22 | for aarfile in glob(['libs/*.aar']):
23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24 | lib_deps.append(':' + name)
25 | android_prebuilt_aar(
26 | name = name,
27 | aar = aarfile,
28 | )
29 |
30 | android_library(
31 | name = 'all-libs',
32 | exported_deps = lib_deps
33 | )
34 |
35 | android_library(
36 | name = 'app-code',
37 | srcs = glob([
38 | 'src/main/java/**/*.java',
39 | ]),
40 | deps = [
41 | ':all-libs',
42 | ':build_config',
43 | ':res',
44 | ],
45 | )
46 |
47 | android_build_config(
48 | name = 'build_config',
49 | package = 'com.example',
50 | )
51 |
52 | android_resource(
53 | name = 'res',
54 | res = 'src/main/res',
55 | package = 'com.example',
56 | )
57 |
58 | android_binary(
59 | name = 'app',
60 | package_type = 'debug',
61 | manifest = 'src/main/AndroidManifest.xml',
62 | keystore = '//android/keystores:debug',
63 | deps = [
64 | ':app-code',
65 | ],
66 | )
67 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property can be in the following formats
30 | * // 'bundleIn${productFlavor}${buildType}'
31 | * // 'bundleIn${buildType}'
32 | * // bundleInFreeDebug: true,
33 | * // bundleInPaidRelease: true,
34 | * // bundleInBeta: true,
35 | *
36 | * // the root of your project, i.e. where "package.json" lives
37 | * root: "../../",
38 | *
39 | * // where to put the JS bundle asset in debug mode
40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
41 | *
42 | * // where to put the JS bundle asset in release mode
43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
44 | *
45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
46 | * // require('./image.png')), in debug mode
47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
48 | *
49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
50 | * // require('./image.png')), in release mode
51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
52 | *
53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
57 | * // for example, you might want to remove it from here.
58 | * inputExcludes: ["android/**", "ios/**"],
59 | *
60 | * // override which node gets called and with what additional arguments
61 | * nodeExecutableAndArgs: ["node"]
62 | *
63 | * // supply additional arguments to the packager
64 | * extraPackagerArgs: []
65 | * ]
66 | */
67 |
68 | apply from: "../../node_modules/react-native/react.gradle"
69 |
70 | /**
71 | * Set this to true to create two separate APKs instead of one:
72 | * - An APK that only works on ARM devices
73 | * - An APK that only works on x86 devices
74 | * The advantage is the size of the APK is reduced by about 4MB.
75 | * Upload all the APKs to the Play Store and people will download
76 | * the correct one based on the CPU architecture of their device.
77 | */
78 | def enableSeparateBuildPerCPUArchitecture = false
79 |
80 | /**
81 | * Run Proguard to shrink the Java bytecode in release builds.
82 | */
83 | def enableProguardInReleaseBuilds = false
84 |
85 | android {
86 | compileSdkVersion 23
87 | buildToolsVersion "23.0.1"
88 |
89 | defaultConfig {
90 | applicationId "com.example"
91 | minSdkVersion 16
92 | targetSdkVersion 22
93 | versionCode 1
94 | versionName "1.0"
95 | ndk {
96 | abiFilters "armeabi-v7a", "x86"
97 | }
98 | }
99 | splits {
100 | abi {
101 | reset()
102 | enable enableSeparateBuildPerCPUArchitecture
103 | universalApk false // If true, also generate a universal APK
104 | include "armeabi-v7a", "x86"
105 | }
106 | }
107 | buildTypes {
108 | release {
109 | minifyEnabled enableProguardInReleaseBuilds
110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
111 | }
112 | }
113 | // applicationVariants are e.g. debug, release
114 | applicationVariants.all { variant ->
115 | variant.outputs.each { output ->
116 | // For each separate APK per architecture, set a unique version code as described here:
117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
118 | def versionCodes = ["armeabi-v7a":1, "x86":2]
119 | def abi = output.getFilter(OutputFile.ABI)
120 | if (abi != null) { // null for the universal-debug, universal-release variants
121 | output.versionCodeOverride =
122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
123 | }
124 | }
125 | }
126 | }
127 |
128 | dependencies {
129 | compile project(':react-native-google-place-picker')
130 | compile fileTree(dir: "libs", include: ["*.jar"])
131 | compile "com.android.support:appcompat-v7:23.0.1"
132 | compile "com.facebook.react:react-native:+" // From node_modules
133 | }
134 |
135 | // Run this once to be able to run the application with BUCK
136 | // puts all compile dependencies into folder libs for BUCK to use
137 | task copyDownloadableDepsToLibs(type: Copy) {
138 | from configurations.compile
139 | into 'libs'
140 | }
141 |
--------------------------------------------------------------------------------
/example/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30 |
31 | # Do not strip any method/class that is annotated with @DoNotStrip
32 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
33 | -keep @com.facebook.common.internal.DoNotStrip class *
34 | -keepclassmembers class * {
35 | @com.facebook.proguard.annotations.DoNotStrip *;
36 | @com.facebook.common.internal.DoNotStrip *;
37 | }
38 |
39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40 | void set*(***);
41 | *** get*();
42 | }
43 |
44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
46 | -keepclassmembers,includedescriptorclasses class * { native ; }
47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
50 |
51 | -dontwarn com.facebook.react.**
52 |
53 | # okhttp
54 |
55 | -keepattributes Signature
56 | -keepattributes *Annotation*
57 | -keep class okhttp3.** { *; }
58 | -keep interface okhttp3.** { *; }
59 | -dontwarn okhttp3.**
60 |
61 | # okio
62 |
63 | -keep class sun.misc.Unsafe { *; }
64 | -dontwarn java.nio.file.*
65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66 | -dontwarn okio.**
67 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
13 |
14 |
20 |
23 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "example";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import android.app.Application;
4 | import android.util.Log;
5 |
6 | import com.facebook.react.ReactApplication;
7 | import com.reactlibrary.RNGooglePlacePickerPackage;
8 | import com.facebook.react.ReactInstanceManager;
9 | import com.facebook.react.ReactNativeHost;
10 | import com.facebook.react.ReactPackage;
11 | import com.facebook.react.shell.MainReactPackage;
12 |
13 | import java.util.Arrays;
14 | import java.util.List;
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 |
18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
19 | @Override
20 | protected boolean getUseDeveloperSupport() {
21 | return BuildConfig.DEBUG;
22 | }
23 |
24 | @Override
25 | protected List getPackages() {
26 | return Arrays.asList(
27 | new MainReactPackage(),
28 | new RNGooglePlacePickerPackage()
29 | );
30 | }
31 | };
32 |
33 | @Override
34 | public ReactNativeHost getReactNativeHost() {
35 | return mReactNativeHost;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhangtaii/react-native-google-place-picker/744b8c85ec6b93e4bb8877c470c75a6952be450a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhangtaii/react-native-google-place-picker/744b8c85ec6b93e4bb8877c470c75a6952be450a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhangtaii/react-native-google-place-picker/744b8c85ec6b93e4bb8877c470c75a6952be450a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhangtaii/react-native-google-place-picker/744b8c85ec6b93e4bb8877c470c75a6952be450a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | example
4 |
5 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | ## Project-wide Gradle settings.
2 | #
3 | # For more details on how to configure your build environment visit
4 | # http://www.gradle.org/docs/current/userguide/build_environment.html
5 | #
6 | # Specifies the JVM arguments used for the daemon process.
7 | # The setting is particularly useful for tweaking memory settings.
8 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
10 | #
11 | # When configured, Gradle will run in incubating parallel mode.
12 | # This option should only be used with decoupled projects. More details, visit
13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
14 | # org.gradle.parallel=true
15 | #Fri Sep 09 11:15:18 CST 2016
16 | systemProp.http.proxyHost=localhost
17 | systemProp.http.proxyPort=1080
18 | android.useDeprecatedNdk=true
19 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhangtaii/react-native-google-place-picker/744b8c85ec6b93e4bb8877c470c75a6952be450a/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/example/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = 'debug',
3 | store = 'debug.keystore',
4 | properties = 'debug.keystore.properties',
5 | visibility = [
6 | 'PUBLIC',
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/example/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'example'
2 |
3 | include ':app'
4 | include ':react-native-google-place-picker'
5 | project(':react-native-google-place-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-place-picker/android')
6 |
--------------------------------------------------------------------------------
/example/index.android.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, { Component } from 'react';
8 | import {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 | import WelcomeScreen from './WelcomeScreen';
15 |
16 | AppRegistry.registerComponent('example', () => WelcomeScreen);
17 |
--------------------------------------------------------------------------------
/example/index.ios.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, { Component } from 'react';
8 | import {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 | import WelcomeScreen from './WelcomeScreen';
15 |
16 | AppRegistry.registerComponent('example', () => WelcomeScreen);
17 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '8.0'
3 | # Uncomment this line if you're using Swift
4 | # use_frameworks!
5 |
6 | target 'example' do
7 | pod 'GooglePlacePicker', '= 2.0.1'
8 | pod 'GooglePlaces', '= 2.0.1'
9 | pod 'GoogleMaps', '= 2.0.1'
10 | end
11 |
12 | target 'exampleTests' do
13 |
14 | end
15 |
16 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - GoogleMaps (2.0.1):
3 | - GoogleMaps/Maps (= 2.0.1)
4 | - GoogleMaps/Base (2.0.1)
5 | - GoogleMaps/Maps (2.0.1):
6 | - GoogleMaps/Base (= 2.0.1)
7 | - GooglePlacePicker (2.0.1):
8 | - GoogleMaps (= 2.0.1)
9 | - GooglePlaces (= 2.0.1)
10 | - GooglePlaces (2.0.1):
11 | - GoogleMaps/Base (= 2.0.1)
12 |
13 | DEPENDENCIES:
14 | - GoogleMaps (= 2.0.1)
15 | - GooglePlacePicker (= 2.0.1)
16 | - GooglePlaces (= 2.0.1)
17 |
18 | SPEC CHECKSUMS:
19 | GoogleMaps: f09da64fc987c1aa29394567c3cab5a3df83c402
20 | GooglePlacePicker: e7b11b732e40dbe76e8ab4c5fc2f4a7c32b96578
21 | GooglePlaces: 72fab1d1651c6df0322f2aad245ffb15b80d3c56
22 |
23 | COCOAPODS: 0.39.0
24 |
--------------------------------------------------------------------------------
/example/ios/example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 | 00E356F31AD99517003FC87E /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; };
16 | 032EF24A70F6D1280F72F034 /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F05F8D17BD7DBA4E7FEE684B /* libPods-example.a */; };
17 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
18 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
19 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
20 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
21 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
22 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
23 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
24 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
26 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
27 | 8812BFDBEBEE43A6B3CC1C51 /* libRNGooglePlacePicker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 38D90C4527AB44B6A25AEEEC /* libRNGooglePlacePicker.a */; };
28 | /* End PBXBuildFile section */
29 |
30 | /* Begin PBXContainerItemProxy section */
31 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
32 | isa = PBXContainerItemProxy;
33 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
34 | proxyType = 2;
35 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
36 | remoteInfo = RCTActionSheet;
37 | };
38 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
39 | isa = PBXContainerItemProxy;
40 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
41 | proxyType = 2;
42 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
43 | remoteInfo = RCTGeolocation;
44 | };
45 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
46 | isa = PBXContainerItemProxy;
47 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
48 | proxyType = 2;
49 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
50 | remoteInfo = RCTImage;
51 | };
52 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
53 | isa = PBXContainerItemProxy;
54 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
55 | proxyType = 2;
56 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
57 | remoteInfo = RCTNetwork;
58 | };
59 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
60 | isa = PBXContainerItemProxy;
61 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
62 | proxyType = 2;
63 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
64 | remoteInfo = RCTVibration;
65 | };
66 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
67 | isa = PBXContainerItemProxy;
68 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
69 | proxyType = 1;
70 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
71 | remoteInfo = example;
72 | };
73 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
74 | isa = PBXContainerItemProxy;
75 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
76 | proxyType = 2;
77 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
78 | remoteInfo = RCTSettings;
79 | };
80 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
81 | isa = PBXContainerItemProxy;
82 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
83 | proxyType = 2;
84 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
85 | remoteInfo = RCTWebSocket;
86 | };
87 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
88 | isa = PBXContainerItemProxy;
89 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
90 | proxyType = 2;
91 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
92 | remoteInfo = React;
93 | };
94 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
95 | isa = PBXContainerItemProxy;
96 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
97 | proxyType = 2;
98 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
99 | remoteInfo = RCTLinking;
100 | };
101 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
102 | isa = PBXContainerItemProxy;
103 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
104 | proxyType = 2;
105 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
106 | remoteInfo = RCTText;
107 | };
108 | 8EC339841D826E2600FDEE17 /* PBXContainerItemProxy */ = {
109 | isa = PBXContainerItemProxy;
110 | containerPortal = E7A3163F32844CD4A2564B87 /* RNGooglePlacePicker.xcodeproj */;
111 | proxyType = 2;
112 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
113 | remoteInfo = RNGooglePlacePicker;
114 | };
115 | /* End PBXContainerItemProxy section */
116 |
117 | /* Begin PBXFileReference section */
118 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
119 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
120 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
121 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
122 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
123 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
124 | 00E356EE1AD99517003FC87E /* exampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = exampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
125 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
126 | 00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = ""; };
127 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
128 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
129 | 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
130 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; };
131 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; };
132 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
133 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; };
134 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; };
135 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; };
136 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
137 | 38D90C4527AB44B6A25AEEEC /* libRNGooglePlacePicker.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNGooglePlacePicker.a; sourceTree = ""; };
138 | 413C85752F9BC780A7D367A9 /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = ""; };
139 | 6C80437EEED8377D08D2D1AE /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Pods/Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = ""; };
140 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
141 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
142 | E7A3163F32844CD4A2564B87 /* RNGooglePlacePicker.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNGooglePlacePicker.xcodeproj; path = "../node_modules/react-native-google-place-picker/ios/RNGooglePlacePicker.xcodeproj"; sourceTree = ""; };
143 | F05F8D17BD7DBA4E7FEE684B /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
144 | /* End PBXFileReference section */
145 |
146 | /* Begin PBXFrameworksBuildPhase section */
147 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
148 | isa = PBXFrameworksBuildPhase;
149 | buildActionMask = 2147483647;
150 | files = (
151 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
152 | );
153 | runOnlyForDeploymentPostprocessing = 0;
154 | };
155 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
156 | isa = PBXFrameworksBuildPhase;
157 | buildActionMask = 2147483647;
158 | files = (
159 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
160 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
161 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
162 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
163 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
164 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
165 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
166 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
167 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
168 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
169 | 8812BFDBEBEE43A6B3CC1C51 /* libRNGooglePlacePicker.a in Frameworks */,
170 | 032EF24A70F6D1280F72F034 /* libPods-example.a in Frameworks */,
171 | );
172 | runOnlyForDeploymentPostprocessing = 0;
173 | };
174 | /* End PBXFrameworksBuildPhase section */
175 |
176 | /* Begin PBXGroup section */
177 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
178 | isa = PBXGroup;
179 | children = (
180 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
181 | );
182 | name = Products;
183 | sourceTree = "";
184 | };
185 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
186 | isa = PBXGroup;
187 | children = (
188 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
189 | );
190 | name = Products;
191 | sourceTree = "";
192 | };
193 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
194 | isa = PBXGroup;
195 | children = (
196 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
197 | );
198 | name = Products;
199 | sourceTree = "";
200 | };
201 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
202 | isa = PBXGroup;
203 | children = (
204 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
205 | );
206 | name = Products;
207 | sourceTree = "";
208 | };
209 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
210 | isa = PBXGroup;
211 | children = (
212 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
213 | );
214 | name = Products;
215 | sourceTree = "";
216 | };
217 | 00E356EF1AD99517003FC87E /* exampleTests */ = {
218 | isa = PBXGroup;
219 | children = (
220 | 00E356F21AD99517003FC87E /* exampleTests.m */,
221 | 00E356F01AD99517003FC87E /* Supporting Files */,
222 | );
223 | path = exampleTests;
224 | sourceTree = "";
225 | };
226 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
227 | isa = PBXGroup;
228 | children = (
229 | 00E356F11AD99517003FC87E /* Info.plist */,
230 | );
231 | name = "Supporting Files";
232 | sourceTree = "";
233 | };
234 | 139105B71AF99BAD00B5F7CC /* Products */ = {
235 | isa = PBXGroup;
236 | children = (
237 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
238 | );
239 | name = Products;
240 | sourceTree = "";
241 | };
242 | 139FDEE71B06529A00C62182 /* Products */ = {
243 | isa = PBXGroup;
244 | children = (
245 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
246 | );
247 | name = Products;
248 | sourceTree = "";
249 | };
250 | 13B07FAE1A68108700A75B9A /* example */ = {
251 | isa = PBXGroup;
252 | children = (
253 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
254 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
255 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
256 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
257 | 13B07FB61A68108700A75B9A /* Info.plist */,
258 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
259 | 13B07FB71A68108700A75B9A /* main.m */,
260 | );
261 | name = example;
262 | sourceTree = "";
263 | };
264 | 146834001AC3E56700842450 /* Products */ = {
265 | isa = PBXGroup;
266 | children = (
267 | 146834041AC3E56700842450 /* libReact.a */,
268 | );
269 | name = Products;
270 | sourceTree = "";
271 | };
272 | 3A244E6799D52767233B5DC9 /* Pods */ = {
273 | isa = PBXGroup;
274 | children = (
275 | 413C85752F9BC780A7D367A9 /* Pods-example.debug.xcconfig */,
276 | 6C80437EEED8377D08D2D1AE /* Pods-example.release.xcconfig */,
277 | );
278 | name = Pods;
279 | sourceTree = "";
280 | };
281 | 78C398B11ACF4ADC00677621 /* Products */ = {
282 | isa = PBXGroup;
283 | children = (
284 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
285 | );
286 | name = Products;
287 | sourceTree = "";
288 | };
289 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
290 | isa = PBXGroup;
291 | children = (
292 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
293 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
294 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
295 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
296 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
297 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
298 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
299 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
300 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
301 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
302 | E7A3163F32844CD4A2564B87 /* RNGooglePlacePicker.xcodeproj */,
303 | );
304 | name = Libraries;
305 | sourceTree = "";
306 | };
307 | 832341B11AAA6A8300B99B32 /* Products */ = {
308 | isa = PBXGroup;
309 | children = (
310 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
311 | );
312 | name = Products;
313 | sourceTree = "";
314 | };
315 | 83CBB9F61A601CBA00E9B192 = {
316 | isa = PBXGroup;
317 | children = (
318 | 13B07FAE1A68108700A75B9A /* example */,
319 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
320 | 00E356EF1AD99517003FC87E /* exampleTests */,
321 | 83CBBA001A601CBA00E9B192 /* Products */,
322 | 3A244E6799D52767233B5DC9 /* Pods */,
323 | A84A9BBB1C2E8DC991CD2C4D /* Frameworks */,
324 | );
325 | indentWidth = 2;
326 | sourceTree = "";
327 | tabWidth = 2;
328 | };
329 | 83CBBA001A601CBA00E9B192 /* Products */ = {
330 | isa = PBXGroup;
331 | children = (
332 | 13B07F961A680F5B00A75B9A /* example.app */,
333 | 00E356EE1AD99517003FC87E /* exampleTests.xctest */,
334 | );
335 | name = Products;
336 | sourceTree = "";
337 | };
338 | 8EC339771D826E2600FDEE17 /* Products */ = {
339 | isa = PBXGroup;
340 | children = (
341 | 8EC339851D826E2600FDEE17 /* libRNGooglePlacePicker.a */,
342 | );
343 | name = Products;
344 | sourceTree = "";
345 | };
346 | A84A9BBB1C2E8DC991CD2C4D /* Frameworks */ = {
347 | isa = PBXGroup;
348 | children = (
349 | F05F8D17BD7DBA4E7FEE684B /* libPods-example.a */,
350 | );
351 | name = Frameworks;
352 | sourceTree = "";
353 | };
354 | /* End PBXGroup section */
355 |
356 | /* Begin PBXNativeTarget section */
357 | 00E356ED1AD99517003FC87E /* exampleTests */ = {
358 | isa = PBXNativeTarget;
359 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */;
360 | buildPhases = (
361 | 00E356EA1AD99517003FC87E /* Sources */,
362 | 00E356EB1AD99517003FC87E /* Frameworks */,
363 | 00E356EC1AD99517003FC87E /* Resources */,
364 | );
365 | buildRules = (
366 | );
367 | dependencies = (
368 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
369 | );
370 | name = exampleTests;
371 | productName = exampleTests;
372 | productReference = 00E356EE1AD99517003FC87E /* exampleTests.xctest */;
373 | productType = "com.apple.product-type.bundle.unit-test";
374 | };
375 | 13B07F861A680F5B00A75B9A /* example */ = {
376 | isa = PBXNativeTarget;
377 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */;
378 | buildPhases = (
379 | 6CF5FDFCF962FAACBF02D4A8 /* Check Pods Manifest.lock */,
380 | 13B07F871A680F5B00A75B9A /* Sources */,
381 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
382 | 13B07F8E1A680F5B00A75B9A /* Resources */,
383 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
384 | 3EBB59896E2E66AEC4C0225A /* Embed Pods Frameworks */,
385 | 160D7EC9B36CAC9E368B6479 /* Copy Pods Resources */,
386 | );
387 | buildRules = (
388 | );
389 | dependencies = (
390 | );
391 | name = example;
392 | productName = "Hello World";
393 | productReference = 13B07F961A680F5B00A75B9A /* example.app */;
394 | productType = "com.apple.product-type.application";
395 | };
396 | /* End PBXNativeTarget section */
397 |
398 | /* Begin PBXProject section */
399 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
400 | isa = PBXProject;
401 | attributes = {
402 | LastUpgradeCheck = 610;
403 | ORGANIZATIONNAME = Facebook;
404 | TargetAttributes = {
405 | 00E356ED1AD99517003FC87E = {
406 | CreatedOnToolsVersion = 6.2;
407 | TestTargetID = 13B07F861A680F5B00A75B9A;
408 | };
409 | };
410 | };
411 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */;
412 | compatibilityVersion = "Xcode 3.2";
413 | developmentRegion = English;
414 | hasScannedForEncodings = 0;
415 | knownRegions = (
416 | en,
417 | Base,
418 | );
419 | mainGroup = 83CBB9F61A601CBA00E9B192;
420 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
421 | projectDirPath = "";
422 | projectReferences = (
423 | {
424 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
425 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
426 | },
427 | {
428 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
429 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
430 | },
431 | {
432 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
433 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
434 | },
435 | {
436 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
437 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
438 | },
439 | {
440 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
441 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
442 | },
443 | {
444 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
445 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
446 | },
447 | {
448 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
449 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
450 | },
451 | {
452 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
453 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
454 | },
455 | {
456 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
457 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
458 | },
459 | {
460 | ProductGroup = 146834001AC3E56700842450 /* Products */;
461 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
462 | },
463 | {
464 | ProductGroup = 8EC339771D826E2600FDEE17 /* Products */;
465 | ProjectRef = E7A3163F32844CD4A2564B87 /* RNGooglePlacePicker.xcodeproj */;
466 | },
467 | );
468 | projectRoot = "";
469 | targets = (
470 | 13B07F861A680F5B00A75B9A /* example */,
471 | 00E356ED1AD99517003FC87E /* exampleTests */,
472 | );
473 | };
474 | /* End PBXProject section */
475 |
476 | /* Begin PBXReferenceProxy section */
477 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
478 | isa = PBXReferenceProxy;
479 | fileType = archive.ar;
480 | path = libRCTActionSheet.a;
481 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
482 | sourceTree = BUILT_PRODUCTS_DIR;
483 | };
484 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
485 | isa = PBXReferenceProxy;
486 | fileType = archive.ar;
487 | path = libRCTGeolocation.a;
488 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
489 | sourceTree = BUILT_PRODUCTS_DIR;
490 | };
491 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
492 | isa = PBXReferenceProxy;
493 | fileType = archive.ar;
494 | path = libRCTImage.a;
495 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
496 | sourceTree = BUILT_PRODUCTS_DIR;
497 | };
498 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
499 | isa = PBXReferenceProxy;
500 | fileType = archive.ar;
501 | path = libRCTNetwork.a;
502 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
503 | sourceTree = BUILT_PRODUCTS_DIR;
504 | };
505 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
506 | isa = PBXReferenceProxy;
507 | fileType = archive.ar;
508 | path = libRCTVibration.a;
509 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
510 | sourceTree = BUILT_PRODUCTS_DIR;
511 | };
512 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
513 | isa = PBXReferenceProxy;
514 | fileType = archive.ar;
515 | path = libRCTSettings.a;
516 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
517 | sourceTree = BUILT_PRODUCTS_DIR;
518 | };
519 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
520 | isa = PBXReferenceProxy;
521 | fileType = archive.ar;
522 | path = libRCTWebSocket.a;
523 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
524 | sourceTree = BUILT_PRODUCTS_DIR;
525 | };
526 | 146834041AC3E56700842450 /* libReact.a */ = {
527 | isa = PBXReferenceProxy;
528 | fileType = archive.ar;
529 | path = libReact.a;
530 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
531 | sourceTree = BUILT_PRODUCTS_DIR;
532 | };
533 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
534 | isa = PBXReferenceProxy;
535 | fileType = archive.ar;
536 | path = libRCTLinking.a;
537 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
538 | sourceTree = BUILT_PRODUCTS_DIR;
539 | };
540 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
541 | isa = PBXReferenceProxy;
542 | fileType = archive.ar;
543 | path = libRCTText.a;
544 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
545 | sourceTree = BUILT_PRODUCTS_DIR;
546 | };
547 | 8EC339851D826E2600FDEE17 /* libRNGooglePlacePicker.a */ = {
548 | isa = PBXReferenceProxy;
549 | fileType = archive.ar;
550 | path = libRNGooglePlacePicker.a;
551 | remoteRef = 8EC339841D826E2600FDEE17 /* PBXContainerItemProxy */;
552 | sourceTree = BUILT_PRODUCTS_DIR;
553 | };
554 | /* End PBXReferenceProxy section */
555 |
556 | /* Begin PBXResourcesBuildPhase section */
557 | 00E356EC1AD99517003FC87E /* Resources */ = {
558 | isa = PBXResourcesBuildPhase;
559 | buildActionMask = 2147483647;
560 | files = (
561 | );
562 | runOnlyForDeploymentPostprocessing = 0;
563 | };
564 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
565 | isa = PBXResourcesBuildPhase;
566 | buildActionMask = 2147483647;
567 | files = (
568 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
569 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
570 | );
571 | runOnlyForDeploymentPostprocessing = 0;
572 | };
573 | /* End PBXResourcesBuildPhase section */
574 |
575 | /* Begin PBXShellScriptBuildPhase section */
576 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
577 | isa = PBXShellScriptBuildPhase;
578 | buildActionMask = 2147483647;
579 | files = (
580 | );
581 | inputPaths = (
582 | );
583 | name = "Bundle React Native code and images";
584 | outputPaths = (
585 | );
586 | runOnlyForDeploymentPostprocessing = 0;
587 | shellPath = /bin/sh;
588 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
589 | };
590 | 160D7EC9B36CAC9E368B6479 /* Copy Pods Resources */ = {
591 | isa = PBXShellScriptBuildPhase;
592 | buildActionMask = 2147483647;
593 | files = (
594 | );
595 | inputPaths = (
596 | );
597 | name = "Copy Pods Resources";
598 | outputPaths = (
599 | );
600 | runOnlyForDeploymentPostprocessing = 0;
601 | shellPath = /bin/sh;
602 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-example/Pods-example-resources.sh\"\n";
603 | showEnvVarsInLog = 0;
604 | };
605 | 3EBB59896E2E66AEC4C0225A /* Embed Pods Frameworks */ = {
606 | isa = PBXShellScriptBuildPhase;
607 | buildActionMask = 2147483647;
608 | files = (
609 | );
610 | inputPaths = (
611 | );
612 | name = "Embed Pods Frameworks";
613 | outputPaths = (
614 | );
615 | runOnlyForDeploymentPostprocessing = 0;
616 | shellPath = /bin/sh;
617 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-example/Pods-example-frameworks.sh\"\n";
618 | showEnvVarsInLog = 0;
619 | };
620 | 6CF5FDFCF962FAACBF02D4A8 /* Check Pods Manifest.lock */ = {
621 | isa = PBXShellScriptBuildPhase;
622 | buildActionMask = 2147483647;
623 | files = (
624 | );
625 | inputPaths = (
626 | );
627 | name = "Check Pods Manifest.lock";
628 | outputPaths = (
629 | );
630 | runOnlyForDeploymentPostprocessing = 0;
631 | shellPath = /bin/sh;
632 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
633 | showEnvVarsInLog = 0;
634 | };
635 | /* End PBXShellScriptBuildPhase section */
636 |
637 | /* Begin PBXSourcesBuildPhase section */
638 | 00E356EA1AD99517003FC87E /* Sources */ = {
639 | isa = PBXSourcesBuildPhase;
640 | buildActionMask = 2147483647;
641 | files = (
642 | 00E356F31AD99517003FC87E /* exampleTests.m in Sources */,
643 | );
644 | runOnlyForDeploymentPostprocessing = 0;
645 | };
646 | 13B07F871A680F5B00A75B9A /* Sources */ = {
647 | isa = PBXSourcesBuildPhase;
648 | buildActionMask = 2147483647;
649 | files = (
650 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
651 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
652 | );
653 | runOnlyForDeploymentPostprocessing = 0;
654 | };
655 | /* End PBXSourcesBuildPhase section */
656 |
657 | /* Begin PBXTargetDependency section */
658 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
659 | isa = PBXTargetDependency;
660 | target = 13B07F861A680F5B00A75B9A /* example */;
661 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
662 | };
663 | /* End PBXTargetDependency section */
664 |
665 | /* Begin PBXVariantGroup section */
666 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
667 | isa = PBXVariantGroup;
668 | children = (
669 | 13B07FB21A68108700A75B9A /* Base */,
670 | );
671 | name = LaunchScreen.xib;
672 | path = example;
673 | sourceTree = "";
674 | };
675 | /* End PBXVariantGroup section */
676 |
677 | /* Begin XCBuildConfiguration section */
678 | 00E356F61AD99517003FC87E /* Debug */ = {
679 | isa = XCBuildConfiguration;
680 | buildSettings = {
681 | BUNDLE_LOADER = "$(TEST_HOST)";
682 | GCC_PREPROCESSOR_DEFINITIONS = (
683 | "DEBUG=1",
684 | "$(inherited)",
685 | );
686 | INFOPLIST_FILE = exampleTests/Info.plist;
687 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
688 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
689 | LIBRARY_SEARCH_PATHS = (
690 | "$(inherited)",
691 | "\"$(SRCROOT)/$(TARGET_NAME)\"",
692 | "\"$(SRCROOT)/$(TARGET_NAME)\"",
693 | );
694 | PRODUCT_NAME = "$(TARGET_NAME)";
695 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example";
696 | };
697 | name = Debug;
698 | };
699 | 00E356F71AD99517003FC87E /* Release */ = {
700 | isa = XCBuildConfiguration;
701 | buildSettings = {
702 | BUNDLE_LOADER = "$(TEST_HOST)";
703 | COPY_PHASE_STRIP = NO;
704 | INFOPLIST_FILE = exampleTests/Info.plist;
705 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
706 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
707 | LIBRARY_SEARCH_PATHS = (
708 | "$(inherited)",
709 | "\"$(SRCROOT)/$(TARGET_NAME)\"",
710 | "\"$(SRCROOT)/$(TARGET_NAME)\"",
711 | );
712 | PRODUCT_NAME = "$(TARGET_NAME)";
713 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example";
714 | };
715 | name = Release;
716 | };
717 | 13B07F941A680F5B00A75B9A /* Debug */ = {
718 | isa = XCBuildConfiguration;
719 | baseConfigurationReference = 413C85752F9BC780A7D367A9 /* Pods-example.debug.xcconfig */;
720 | buildSettings = {
721 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
722 | DEAD_CODE_STRIPPING = NO;
723 | HEADER_SEARCH_PATHS = (
724 | "$(inherited)",
725 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
726 | "$(SRCROOT)/../node_modules/react-native/React/**",
727 | "$(SRCROOT)/../node_modules/react-native-google-place-picker/ios/**",
728 | );
729 | INFOPLIST_FILE = example/Info.plist;
730 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
731 | OTHER_LDFLAGS = (
732 | "$(inherited)",
733 | "-ObjC",
734 | "-lc++",
735 | );
736 | PRODUCT_NAME = example;
737 | };
738 | name = Debug;
739 | };
740 | 13B07F951A680F5B00A75B9A /* Release */ = {
741 | isa = XCBuildConfiguration;
742 | baseConfigurationReference = 6C80437EEED8377D08D2D1AE /* Pods-example.release.xcconfig */;
743 | buildSettings = {
744 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
745 | HEADER_SEARCH_PATHS = (
746 | "$(inherited)",
747 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
748 | "$(SRCROOT)/../node_modules/react-native/React/**",
749 | "$(SRCROOT)/../node_modules/react-native-google-place-picker/ios/**",
750 | );
751 | INFOPLIST_FILE = example/Info.plist;
752 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
753 | OTHER_LDFLAGS = (
754 | "$(inherited)",
755 | "-ObjC",
756 | "-lc++",
757 | );
758 | PRODUCT_NAME = example;
759 | };
760 | name = Release;
761 | };
762 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
763 | isa = XCBuildConfiguration;
764 | buildSettings = {
765 | ALWAYS_SEARCH_USER_PATHS = NO;
766 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
767 | CLANG_CXX_LIBRARY = "libc++";
768 | CLANG_ENABLE_MODULES = YES;
769 | CLANG_ENABLE_OBJC_ARC = YES;
770 | CLANG_WARN_BOOL_CONVERSION = YES;
771 | CLANG_WARN_CONSTANT_CONVERSION = YES;
772 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
773 | CLANG_WARN_EMPTY_BODY = YES;
774 | CLANG_WARN_ENUM_CONVERSION = YES;
775 | CLANG_WARN_INT_CONVERSION = YES;
776 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
777 | CLANG_WARN_UNREACHABLE_CODE = YES;
778 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
779 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
780 | COPY_PHASE_STRIP = NO;
781 | ENABLE_STRICT_OBJC_MSGSEND = YES;
782 | GCC_C_LANGUAGE_STANDARD = gnu99;
783 | GCC_DYNAMIC_NO_PIC = NO;
784 | GCC_OPTIMIZATION_LEVEL = 0;
785 | GCC_PREPROCESSOR_DEFINITIONS = (
786 | "DEBUG=1",
787 | "$(inherited)",
788 | );
789 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
790 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
791 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
792 | GCC_WARN_UNDECLARED_SELECTOR = YES;
793 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
794 | GCC_WARN_UNUSED_FUNCTION = YES;
795 | GCC_WARN_UNUSED_VARIABLE = YES;
796 | HEADER_SEARCH_PATHS = (
797 | "$(inherited)",
798 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
799 | "$(SRCROOT)/../node_modules/react-native/React/**",
800 | "$(SRCROOT)/../node_modules/react-native-google-place-picker/ios/**",
801 | );
802 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
803 | MTL_ENABLE_DEBUG_INFO = YES;
804 | ONLY_ACTIVE_ARCH = YES;
805 | SDKROOT = iphoneos;
806 | };
807 | name = Debug;
808 | };
809 | 83CBBA211A601CBA00E9B192 /* Release */ = {
810 | isa = XCBuildConfiguration;
811 | buildSettings = {
812 | ALWAYS_SEARCH_USER_PATHS = NO;
813 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
814 | CLANG_CXX_LIBRARY = "libc++";
815 | CLANG_ENABLE_MODULES = YES;
816 | CLANG_ENABLE_OBJC_ARC = YES;
817 | CLANG_WARN_BOOL_CONVERSION = YES;
818 | CLANG_WARN_CONSTANT_CONVERSION = YES;
819 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
820 | CLANG_WARN_EMPTY_BODY = YES;
821 | CLANG_WARN_ENUM_CONVERSION = YES;
822 | CLANG_WARN_INT_CONVERSION = YES;
823 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
824 | CLANG_WARN_UNREACHABLE_CODE = YES;
825 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
826 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
827 | COPY_PHASE_STRIP = YES;
828 | ENABLE_NS_ASSERTIONS = NO;
829 | ENABLE_STRICT_OBJC_MSGSEND = YES;
830 | GCC_C_LANGUAGE_STANDARD = gnu99;
831 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
832 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
833 | GCC_WARN_UNDECLARED_SELECTOR = YES;
834 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
835 | GCC_WARN_UNUSED_FUNCTION = YES;
836 | GCC_WARN_UNUSED_VARIABLE = YES;
837 | HEADER_SEARCH_PATHS = (
838 | "$(inherited)",
839 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
840 | "$(SRCROOT)/../node_modules/react-native/React/**",
841 | "$(SRCROOT)/../node_modules/react-native-google-place-picker/ios/**",
842 | );
843 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
844 | MTL_ENABLE_DEBUG_INFO = NO;
845 | SDKROOT = iphoneos;
846 | VALIDATE_PRODUCT = YES;
847 | };
848 | name = Release;
849 | };
850 | /* End XCBuildConfiguration section */
851 |
852 | /* Begin XCConfigurationList section */
853 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */ = {
854 | isa = XCConfigurationList;
855 | buildConfigurations = (
856 | 00E356F61AD99517003FC87E /* Debug */,
857 | 00E356F71AD99517003FC87E /* Release */,
858 | );
859 | defaultConfigurationIsVisible = 0;
860 | defaultConfigurationName = Release;
861 | };
862 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = {
863 | isa = XCConfigurationList;
864 | buildConfigurations = (
865 | 13B07F941A680F5B00A75B9A /* Debug */,
866 | 13B07F951A680F5B00A75B9A /* Release */,
867 | );
868 | defaultConfigurationIsVisible = 0;
869 | defaultConfigurationName = Release;
870 | };
871 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = {
872 | isa = XCConfigurationList;
873 | buildConfigurations = (
874 | 83CBBA201A601CBA00E9B192 /* Debug */,
875 | 83CBBA211A601CBA00E9B192 /* Release */,
876 | );
877 | defaultConfigurationIsVisible = 0;
878 | defaultConfigurationName = Release;
879 | };
880 | /* End XCConfigurationList section */
881 | };
882 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
883 | }
884 |
--------------------------------------------------------------------------------
/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/example/ios/example.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/example/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/example/ios/example/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import "RCTBundleURLProvider.h"
13 | #import "RCTRootView.h"
14 |
15 | #import
16 | #import
17 |
18 |
19 | @implementation AppDelegate
20 |
21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
22 | {
23 | NSString *kAPIKey = @"AIzaSyDua-bm5Y_Wg2nfoOCJHDjcS9qsiB7m2kQ";
24 | [GMSPlacesClient provideAPIKey:kAPIKey];
25 | [GMSServices provideAPIKey:kAPIKey];
26 |
27 | NSURL *jsCodeLocation;
28 |
29 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
30 |
31 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
32 | moduleName:@"example"
33 | initialProperties:nil
34 | launchOptions:launchOptions];
35 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
36 |
37 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
38 | UIViewController *rootViewController = [UIViewController new];
39 | rootViewController.view = rootView;
40 | self.window.rootViewController = rootViewController;
41 | [self.window makeKeyAndVisible];
42 | return YES;
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/example/ios/example/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/example/ios/example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSTemporaryExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/example/ios/example/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/example/ios/exampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/example/ios/exampleTests/exampleTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import "RCTLog.h"
14 | #import "RCTRootView.h"
15 |
16 | #define TIMEOUT_SECONDS 600
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface exampleTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation exampleTests
24 |
25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 | {
27 | if (test(view)) {
28 | return YES;
29 | }
30 | for (UIView *subview in [view subviews]) {
31 | if ([self findSubviewInView:subview matching:test]) {
32 | return YES;
33 | }
34 | }
35 | return NO;
36 | }
37 |
38 | - (void)testRendersWelcomeScreen
39 | {
40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 | BOOL foundElement = NO;
43 |
44 | __block NSString *redboxError = nil;
45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
46 | if (level >= RCTLogLevelError) {
47 | redboxError = message;
48 | }
49 | });
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | RCTSetLogFunction(RCTDefaultLogFunction);
64 |
65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
67 | }
68 |
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start"
7 | },
8 | "dependencies": {
9 | "react": "15.3.1",
10 | "react-native": "0.32.1",
11 | "react-native-google-place-picker": "../"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 |
2 | import { NativeModules } from 'react-native';
3 |
4 | const { RNGooglePlacePicker } = NativeModules;
5 |
6 | export default RNGooglePlacePicker;
7 |
--------------------------------------------------------------------------------
/ios/RNGooglePlacePicker.h:
--------------------------------------------------------------------------------
1 | #if __has_include()
2 | #import
3 | #else
4 | #import "RCTBridgeModule.h"
5 | #endif
6 |
7 | @interface RNGooglePlacePicker : NSObject
8 |
9 | @end
10 |
--------------------------------------------------------------------------------
/ios/RNGooglePlacePicker.m:
--------------------------------------------------------------------------------
1 | #import "RNGooglePlacePicker.h"
2 | #import "RCTEventDispatcher.h"
3 | #import
4 | #import
5 |
6 |
7 | @implementation RNGooglePlacePicker {
8 | GMSPlacePicker *_placePicker;
9 | }
10 |
11 | RCT_EXPORT_MODULE()
12 |
13 | - (dispatch_queue_t)methodQueue {
14 | return dispatch_get_main_queue();
15 | }
16 |
17 | RCT_EXPORT_METHOD(show:
18 | (RCTResponseSenderBlock) callback) {
19 | GMSPlacePickerConfig *config = [[GMSPlacePickerConfig alloc] initWithViewport:nil];
20 | _placePicker = [[GMSPlacePicker alloc] initWithConfig:config];
21 | [_placePicker pickPlaceWithCallback:^(GMSPlace *place, NSError *error) {
22 | if (place) {
23 | NSMutableDictionary *response = [[NSMutableDictionary alloc] init];
24 | if (place.formattedAddress) {
25 | [response setObject:place.formattedAddress forKey:@"address"];
26 | } else {
27 | [response setObject:[NSNull null] forKey:@"address"];
28 | }
29 | if (place.name) {
30 | [response setObject:place.name forKey:@"name"];
31 | } else {
32 | [response setObject:[NSNull null] forKey:@"name"];
33 | }
34 | if (place.placeID) {
35 | [response setObject:place.placeID forKey:@"google_id"];
36 | } else {
37 | [response setObject:[NSNull null] forKey:@"google_id"];
38 | }
39 | [response setObject:@(place.coordinate.latitude) forKey:@"latitude"];
40 | [response setObject:@(place.coordinate.longitude) forKey:@"longitude"];
41 | callback(@[response]);
42 | } else if (error) {
43 | callback(@[@{@"error" : error.localizedFailureReason}]);
44 |
45 | } else {
46 | callback(@[@{@"didCancel" : @YES}]);
47 | }
48 | }];
49 |
50 | }
51 |
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/ios/RNGooglePlacePicker.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | B3E7B58A1CC2AC0600A0062D /* RNGooglePlacePicker.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNGooglePlacePicker.m */; };
11 | /* End PBXBuildFile section */
12 |
13 | /* Begin PBXCopyFilesBuildPhase section */
14 | 58B511D91A9E6C8500147676 /* CopyFiles */ = {
15 | isa = PBXCopyFilesBuildPhase;
16 | buildActionMask = 2147483647;
17 | dstPath = "include/$(PRODUCT_NAME)";
18 | dstSubfolderSpec = 16;
19 | files = (
20 | );
21 | runOnlyForDeploymentPostprocessing = 0;
22 | };
23 | /* End PBXCopyFilesBuildPhase section */
24 |
25 | /* Begin PBXFileReference section */
26 | 134814201AA4EA6300B7C361 /* libRNGooglePlacePicker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNGooglePlacePicker.a; sourceTree = BUILT_PRODUCTS_DIR; };
27 | B3E7B5881CC2AC0600A0062D /* RNGooglePlacePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNGooglePlacePicker.h; sourceTree = ""; };
28 | B3E7B5891CC2AC0600A0062D /* RNGooglePlacePicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNGooglePlacePicker.m; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | );
37 | runOnlyForDeploymentPostprocessing = 0;
38 | };
39 | /* End PBXFrameworksBuildPhase section */
40 |
41 | /* Begin PBXGroup section */
42 | 134814211AA4EA7D00B7C361 /* Products */ = {
43 | isa = PBXGroup;
44 | children = (
45 | 134814201AA4EA6300B7C361 /* libRNGooglePlacePicker.a */,
46 | );
47 | name = Products;
48 | sourceTree = "";
49 | };
50 | 58B511D21A9E6C8500147676 = {
51 | isa = PBXGroup;
52 | children = (
53 | B3E7B5881CC2AC0600A0062D /* RNGooglePlacePicker.h */,
54 | B3E7B5891CC2AC0600A0062D /* RNGooglePlacePicker.m */,
55 | 134814211AA4EA7D00B7C361 /* Products */,
56 | );
57 | sourceTree = "";
58 | };
59 | /* End PBXGroup section */
60 |
61 | /* Begin PBXNativeTarget section */
62 | 58B511DA1A9E6C8500147676 /* RNGooglePlacePicker */ = {
63 | isa = PBXNativeTarget;
64 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNGooglePlacePicker" */;
65 | buildPhases = (
66 | 58B511D71A9E6C8500147676 /* Sources */,
67 | 58B511D81A9E6C8500147676 /* Frameworks */,
68 | 58B511D91A9E6C8500147676 /* CopyFiles */,
69 | );
70 | buildRules = (
71 | );
72 | dependencies = (
73 | );
74 | name = RNGooglePlacePicker;
75 | productName = RCTDataManager;
76 | productReference = 134814201AA4EA6300B7C361 /* libRNGooglePlacePicker.a */;
77 | productType = "com.apple.product-type.library.static";
78 | };
79 | /* End PBXNativeTarget section */
80 |
81 | /* Begin PBXProject section */
82 | 58B511D31A9E6C8500147676 /* Project object */ = {
83 | isa = PBXProject;
84 | attributes = {
85 | LastUpgradeCheck = 0610;
86 | ORGANIZATIONNAME = Facebook;
87 | TargetAttributes = {
88 | 58B511DA1A9E6C8500147676 = {
89 | CreatedOnToolsVersion = 6.1.1;
90 | };
91 | };
92 | };
93 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNGooglePlacePicker" */;
94 | compatibilityVersion = "Xcode 3.2";
95 | developmentRegion = English;
96 | hasScannedForEncodings = 0;
97 | knownRegions = (
98 | en,
99 | );
100 | mainGroup = 58B511D21A9E6C8500147676;
101 | productRefGroup = 58B511D21A9E6C8500147676;
102 | projectDirPath = "";
103 | projectRoot = "";
104 | targets = (
105 | 58B511DA1A9E6C8500147676 /* RNGooglePlacePicker */,
106 | );
107 | };
108 | /* End PBXProject section */
109 |
110 | /* Begin PBXSourcesBuildPhase section */
111 | 58B511D71A9E6C8500147676 /* Sources */ = {
112 | isa = PBXSourcesBuildPhase;
113 | buildActionMask = 2147483647;
114 | files = (
115 | B3E7B58A1CC2AC0600A0062D /* RNGooglePlacePicker.m in Sources */,
116 | );
117 | runOnlyForDeploymentPostprocessing = 0;
118 | };
119 | /* End PBXSourcesBuildPhase section */
120 |
121 | /* Begin XCBuildConfiguration section */
122 | 58B511ED1A9E6C8500147676 /* Debug */ = {
123 | isa = XCBuildConfiguration;
124 | buildSettings = {
125 | ALWAYS_SEARCH_USER_PATHS = NO;
126 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
127 | CLANG_CXX_LIBRARY = "libc++";
128 | CLANG_ENABLE_MODULES = YES;
129 | CLANG_ENABLE_OBJC_ARC = YES;
130 | CLANG_WARN_BOOL_CONVERSION = YES;
131 | CLANG_WARN_CONSTANT_CONVERSION = YES;
132 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
133 | CLANG_WARN_EMPTY_BODY = YES;
134 | CLANG_WARN_ENUM_CONVERSION = YES;
135 | CLANG_WARN_INT_CONVERSION = YES;
136 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
137 | CLANG_WARN_UNREACHABLE_CODE = YES;
138 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
139 | COPY_PHASE_STRIP = NO;
140 | ENABLE_STRICT_OBJC_MSGSEND = YES;
141 | GCC_C_LANGUAGE_STANDARD = gnu99;
142 | GCC_DYNAMIC_NO_PIC = NO;
143 | GCC_OPTIMIZATION_LEVEL = 0;
144 | GCC_PREPROCESSOR_DEFINITIONS = (
145 | "DEBUG=1",
146 | "$(inherited)",
147 | );
148 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
149 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
150 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
151 | GCC_WARN_UNDECLARED_SELECTOR = YES;
152 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
153 | GCC_WARN_UNUSED_FUNCTION = YES;
154 | GCC_WARN_UNUSED_VARIABLE = YES;
155 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
156 | MTL_ENABLE_DEBUG_INFO = YES;
157 | ONLY_ACTIVE_ARCH = YES;
158 | SDKROOT = iphoneos;
159 | };
160 | name = Debug;
161 | };
162 | 58B511EE1A9E6C8500147676 /* Release */ = {
163 | isa = XCBuildConfiguration;
164 | buildSettings = {
165 | ALWAYS_SEARCH_USER_PATHS = NO;
166 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
167 | CLANG_CXX_LIBRARY = "libc++";
168 | CLANG_ENABLE_MODULES = YES;
169 | CLANG_ENABLE_OBJC_ARC = YES;
170 | CLANG_WARN_BOOL_CONVERSION = YES;
171 | CLANG_WARN_CONSTANT_CONVERSION = YES;
172 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
173 | CLANG_WARN_EMPTY_BODY = YES;
174 | CLANG_WARN_ENUM_CONVERSION = YES;
175 | CLANG_WARN_INT_CONVERSION = YES;
176 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
177 | CLANG_WARN_UNREACHABLE_CODE = YES;
178 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
179 | COPY_PHASE_STRIP = YES;
180 | ENABLE_NS_ASSERTIONS = NO;
181 | ENABLE_STRICT_OBJC_MSGSEND = YES;
182 | GCC_C_LANGUAGE_STANDARD = gnu99;
183 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
184 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
185 | GCC_WARN_UNDECLARED_SELECTOR = YES;
186 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
187 | GCC_WARN_UNUSED_FUNCTION = YES;
188 | GCC_WARN_UNUSED_VARIABLE = YES;
189 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
190 | MTL_ENABLE_DEBUG_INFO = NO;
191 | SDKROOT = iphoneos;
192 | VALIDATE_PRODUCT = YES;
193 | };
194 | name = Release;
195 | };
196 | 58B511F01A9E6C8500147676 /* Debug */ = {
197 | isa = XCBuildConfiguration;
198 | buildSettings = {
199 | FRAMEWORK_SEARCH_PATHS = (
200 | "$(inherited)",
201 | "\"${SRCROOT}/../../../ios/Pods/GoogleMaps/Subspecs/Base/Frameworks\"",
202 | "\"${SRCROOT}/../../../ios/Pods/GoogleMaps/Subspecs/Maps/Frameworks\"",
203 | "\"${SRCROOT}/../../../ios/Pods/GoogleMaps/Subspecs/Maps/Frameworks\"",
204 | "\"${SRCROOT}/../../../ios/Pods/GooglePlacePicker/Frameworks\"",
205 | "\"${SRCROOT}/../../../ios/Pods/GooglePlaces/Frameworks\"",
206 | );
207 | HEADER_SEARCH_PATHS = (
208 | "$(inherited)",
209 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
210 | "$(SRCROOT)/../../../React/**",
211 | "$(SRCROOT)/../../react-native/React/**",
212 | );
213 | LIBRARY_SEARCH_PATHS = "$(inherited)";
214 | OTHER_LDFLAGS = "-ObjC";
215 | PRODUCT_NAME = RNGooglePlacePicker;
216 | SKIP_INSTALL = YES;
217 | };
218 | name = Debug;
219 | };
220 | 58B511F11A9E6C8500147676 /* Release */ = {
221 | isa = XCBuildConfiguration;
222 | buildSettings = {
223 | FRAMEWORK_SEARCH_PATHS = (
224 | "$(inherited)",
225 | "\"${SRCROOT}/../../../ios/Pods/GoogleMaps/Subspecs/Base/Frameworks\"",
226 | "\"${SRCROOT}/../../../ios/Pods/GoogleMaps/Subspecs/Maps/Frameworks\"",
227 | "\"${SRCROOT}/../../../ios/Pods/GoogleMaps/Subspecs/Maps/Frameworks\"",
228 | "\"${SRCROOT}/../../../ios/Pods/GooglePlacePicker/Frameworks\"",
229 | "\"${SRCROOT}/../../../ios/Pods/GooglePlaces/Frameworks\"",
230 | );
231 | HEADER_SEARCH_PATHS = (
232 | "$(inherited)",
233 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
234 | "$(SRCROOT)/../../../React/**",
235 | "$(SRCROOT)/../../react-native/React/**",
236 | );
237 | LIBRARY_SEARCH_PATHS = "$(inherited)";
238 | OTHER_LDFLAGS = "-ObjC";
239 | PRODUCT_NAME = RNGooglePlacePicker;
240 | SKIP_INSTALL = YES;
241 | };
242 | name = Release;
243 | };
244 | /* End XCBuildConfiguration section */
245 |
246 | /* Begin XCConfigurationList section */
247 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNGooglePlacePicker" */ = {
248 | isa = XCConfigurationList;
249 | buildConfigurations = (
250 | 58B511ED1A9E6C8500147676 /* Debug */,
251 | 58B511EE1A9E6C8500147676 /* Release */,
252 | );
253 | defaultConfigurationIsVisible = 0;
254 | defaultConfigurationName = Release;
255 | };
256 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNGooglePlacePicker" */ = {
257 | isa = XCConfigurationList;
258 | buildConfigurations = (
259 | 58B511F01A9E6C8500147676 /* Debug */,
260 | 58B511F11A9E6C8500147676 /* Release */,
261 | );
262 | defaultConfigurationIsVisible = 0;
263 | defaultConfigurationName = Release;
264 | };
265 | /* End XCConfigurationList section */
266 | };
267 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
268 | }
269 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-google-place-picker",
3 | "publishConfig": {
4 | "registry": "https://registry.npmjs.org/"
5 | },
6 | "version": "1.2.2",
7 | "description": "React Native Wrapper of Google Place Picker for iOS + Android.",
8 | "nativePackage": true,
9 | "main": "index.js",
10 | "scripts": {
11 | "test": "echo \"Error: no test specified\" && exit 1"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git+https://github.com/q6112345/react-native-google-place-picker.git"
16 | },
17 | "keywords": [
18 | "react-native",
19 | "ios",
20 | "android",
21 | "input",
22 | "map",
23 | "location",
24 | "google",
25 | "maps",
26 | "places",
27 | "place",
28 | "picker"
29 | ],
30 | "author": "q6112345",
31 | "license": "MIT",
32 | "bugs": {
33 | "url": "https://github.com/q6112345/react-native-google-place-picker/issues"
34 | },
35 | "homepage": "https://github.com/q6112345/react-native-google-place-picker#readme",
36 | "rnpm": {
37 | "commands": {
38 | "prelink": "node_modules/react-native-google-place-picker/bin/prepare.sh",
39 | "postlink": "node_modules/react-native-google-place-picker/bin/cocoapods.sh"
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------