Skip to content

Commit

Permalink
Merge pull request #606 from Polidea/extracting-MBA
Browse files Browse the repository at this point in the history
Switch native implementation to MultiPlatformBLEAdapter
  • Loading branch information
Cierpliwy authored Mar 26, 2020
2 parents 3c7f042 + 0f6c405 commit 3ab2982
Show file tree
Hide file tree
Showing 234 changed files with 2,613 additions and 30,091 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ DerivedData
*.xcuserstate
project.xcworkspace

Pods/

# Android/IntelliJ
#
build/
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ Contact us at [Gitter](https://gitter.im/RxBLELibraries/react-native-ble) if you
5. Update your `ios/Podfile` to contain:
```
pod 'react-native-ble-plx', :path => '../node_modules/react-native-ble-plx'
pod 'react-native-ble-plx-swift', :path => '../node_modules/react-native-ble-plx'
```
6. Enter `ios` folder and run `pod update`
7. Minimal supported version of iOS is 8.0
Expand Down Expand Up @@ -124,8 +123,17 @@ android {
minSdkVersion 18
...
```
4. In `build.gradle` of `app` module make sure to add jitpack repository to known repositories:

4. In `AndroidManifest.xml`, add Bluetooth permissions and update `<uses-sdk/>`:
```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
5. In `AndroidManifest.xml`, add Bluetooth permissions and update `<uses-sdk/>`:

```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
Expand All @@ -144,7 +152,7 @@ android {
...
```

5. If you are using AndroidX, then for the time being you need to convert import statements in the Android library with [jetifier](https://www.npmjs.com/package/jetifier). These steps apply for all react-native packages, which are during the transition period:
6. If you are using AndroidX, then for the time being you need to convert import statements in the Android library with [jetifier](https://www.npmjs.com/package/jetifier). These steps apply for all react-native packages, which are during the transition period:

- `npm install --save-dev jetifier`
- Run `jetify` script after `npm install`. You can do it by adding "postinstall" script to the `package.json` file:
Expand Down
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ repositories {
url 'https://maven.google.com/'
name 'Google'
}
maven { url "https://jitpack.io" }
}

dependencies {
implementation "com.facebook.react:react-native:+"
implementation "com.polidea.rxandroidble:rxandroidble:1.7.0"
implementation 'com.github.Polidea:MultiPlatformBleAdapter:58c87b49f12f4a5ab6f7af31f8085249e206400a'
testImplementation 'org.robospock:robospock:1.0.1'
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
Empty file added android/settings.gradle
Empty file.
Loading

0 comments on commit 3ab2982

Please sign in to comment.