-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9178b23
Showing
26 changed files
with
3,097 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pbxproj -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
# OSX | ||
# | ||
.DS_Store | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
project.xcworkspace | ||
|
||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
|
||
# BUCK | ||
buck-out/ | ||
\.buckd/ | ||
*.keystore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
# react-native-react-native-google-places | ||
|
||
## Getting started | ||
|
||
`$ npm install react-native-react-native-google-places --save` | ||
|
||
### Mostly automatic installation | ||
|
||
`$ react-native link react-native-react-native-google-places` | ||
|
||
### Manual installation | ||
|
||
|
||
#### iOS | ||
|
||
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` | ||
2. Go to `node_modules` ➜ `react-native-react-native-google-places` and add `RNReactNativeGooglePlaces.xcodeproj` | ||
3. In XCode, in the project navigator, select your project. Add `libRNReactNativeGooglePlaces.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` | ||
4. Run your project (`Cmd+R`)< | ||
|
||
#### Android | ||
|
||
1. Open up `android/app/src/main/java/[...]/MainActivity.java` | ||
- Add `import com.reactlibrary.RNReactNativeGooglePlacesPackage;` to the imports at the top of the file | ||
- Add `new RNReactNativeGooglePlacesPackage()` to the list returned by the `getPackages()` method | ||
2. Append the following lines to `android/settings.gradle`: | ||
``` | ||
include ':react-native-react-native-google-places' | ||
project(':react-native-react-native-google-places').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-react-native-google-places/android') | ||
``` | ||
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: | ||
``` | ||
compile project(':react-native-react-native-google-places') | ||
``` | ||
|
||
#### Windows | ||
[Read it! :D](https://github.com/ReactWindows/react-native) | ||
|
||
1. In Visual Studio add the `RNReactNativeGooglePlaces.sln` in `node_modules/react-native-react-native-google-places/windows/RNReactNativeGooglePlaces.sln` folder to their solution, reference from their app. | ||
2. Open up your `MainPage.cs` app | ||
- Add `using React.Native.Google.Places.RNReactNativeGooglePlaces;` to the usings at the top of the file | ||
- Add `new RNReactNativeGooglePlacesPackage()` to the `List<IReactPackage>` returned by the `Packages` method | ||
|
||
|
||
## Usage | ||
```javascript | ||
import RNReactNativeGooglePlaces from 'react-native-react-native-google-places'; | ||
|
||
// TODO: What to do with the module? | ||
RNReactNativeGooglePlaces; | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>android</name> | ||
<comment>Project android created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connection.project.dir= | ||
eclipse.preferences.version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
def DEFAULT_COMPILE_SDK_VERSION = 28 | ||
def DEFAULT_TARGET_SDK_VERSION = 28 | ||
def DEFAULT_SUPPORT_LIB_VERSION = "28.0.0" | ||
def DEFAULT_MIN_SDK_VERSION = 16 | ||
|
||
def safeExtGet(prop, fallback) { | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
} | ||
|
||
|
||
android { | ||
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) | ||
|
||
defaultConfig { | ||
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) | ||
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION) | ||
resValue "string", "places_api_key", (System.env.RNGP_ANDROID_API_KEY ? "$System.env.RNGP_ANDROID_API_KEY" : (rootProject.findProperty("RNGP_ANDROID_API_KEY") ?: "INSERT_KEY_HERE")) | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
packagingOptions { | ||
exclude 'META-INF/LICENSE' | ||
exclude 'META-INF/DEPENDENCIES.txt' | ||
exclude 'META-INF/LICENSE.txt' | ||
exclude 'META-INF/NOTICE.txt' | ||
exclude 'META-INF/NOTICE' | ||
exclude 'META-INF/DEPENDENCIES' | ||
exclude 'META-INF/notice.txt' | ||
exclude 'META-INF/license.txt' | ||
exclude 'META-INF/dependencies.txt' | ||
exclude 'META-INF/LGPL2.1' | ||
} | ||
|
||
lintOptions { | ||
disable 'InvalidPackage' | ||
} | ||
} | ||
|
||
dependencies { | ||
def supportLibVersion = safeExtGet('supportLibVersion', DEFAULT_SUPPORT_LIB_VERSION) | ||
|
||
implementation "com.facebook.react:react-native:+" | ||
implementation "com.google.android.libraries.places:places:1.1.0" | ||
implementation "com.android.support:appcompat-v7:${supportLibVersion}" | ||
implementation "com.android.support:support-v4:${supportLibVersion}" | ||
implementation "com.google.code.findbugs:jsr305:3.0.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<manifest package="com.arttitude360.reactnative.rngoogleplaces" | ||
xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application | ||
android:label="@string/app_name" | ||
android:supportsRtl="true"> | ||
|
||
</application> | ||
|
||
</manifest> |
Oops, something went wrong.