Skip to content

Commit 68da24c

Browse files
chore: update react-native-ble-plx to version 3.5.1 and remove deprecated/stale code
1 parent 1a2bb2d commit 68da24c

9 files changed

Lines changed: 289 additions & 295 deletions

File tree

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
package com.mendix.developerapp
22

3-
import android.content.Context
43
import com.facebook.react.PackageList
5-
import com.facebook.react.ReactInstanceManager
64
import com.facebook.react.ReactPackage
75
import com.mendix.developerapp.utilities.CrashlyticsErrorHandler
86
import com.mendix.mendixnative.MendixReactApplication
97
import com.mendix.mendixnative.error.ErrorHandler
10-
import java.lang.reflect.InvocationTargetException
118

129
@Suppress("unused")
1310
open class BaseApplication : MendixReactApplication() {
1411

15-
override fun onCreate() {
16-
super.onCreate()
17-
if(reactNativeHost.hasInstance()) {
18-
initializeFlipper(this, reactNativeHost.reactInstanceManager)
19-
}
20-
}
21-
2212
override fun getPackages(): List<ReactPackage> {
2313
val packages: MutableList<ReactPackage> = PackageList(this).packages
2414

@@ -32,32 +22,4 @@ open class BaseApplication : MendixReactApplication() {
3222
override fun createErrorHandler(): ErrorHandler {
3323
return CrashlyticsErrorHandler(this)
3424
}
35-
36-
private fun initializeFlipper(context: Context, reactInstanceManager: ReactInstanceManager) {
37-
if (BuildConfig.DEBUG) {
38-
try {
39-
/*
40-
* We use reflection here to pick up the class that initializes Flipper, since
41-
* Flipper library is not available in release mode
42-
*/
43-
val aClass = Class.forName("com.mendix.developerapp.flipper.ReactNativeFlipper")
44-
aClass.getMethod(
45-
"initializeFlipper",
46-
Context::class.java,
47-
ReactInstanceManager::class.java
48-
).invoke(
49-
null, context,
50-
reactInstanceManager
51-
)
52-
} catch (e: ClassNotFoundException) {
53-
e.printStackTrace()
54-
} catch (e: NoSuchMethodException) {
55-
e.printStackTrace()
56-
} catch (e: IllegalAccessException) {
57-
e.printStackTrace()
58-
} catch (e: InvocationTargetException) {
59-
e.printStackTrace()
60-
}
61-
}
62-
}
6325
}

android/app/src/production/java/com/mendix/developerapp/mendixapp/MendixProjectFragment.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ class MendixProjectFragment : MendixProjectFragmentBase() {
2020
super.onCreate(savedInstanceState)
2121

2222
// Setting up our download listener
23-
reactNativeHost.reactInstanceManager.devSupportManager.apply {
24-
setBundleDownloadListener(this, viewModel.devServerCallback)
25-
}
23+
setBundleDownloadListener(reactHost?.devSupportManager, viewModel.devServerCallback)
2624

2725
// This now uses built-in RN mechanism to show bundling progress.
2826
DefaultDevLoadingViewImplementation.setDevLoadingEnabled(true);

android/build.gradle

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ allprojects {
7171
// Uncomment the following line if Windows fails due to long paths
7272
// buildDir = c:/temp/${rootProject.name}/${project.name}
7373
repositories {
74-
all { ArtifactRepository repo ->
75-
if (repo.url.toString().contains("jcenter.bintray.com")) {
76-
remove repo
77-
mavenCentral()
78-
}
79-
}
80-
google()
81-
maven { url 'https://jitpack.io' }
8274
maven {
8375
url "$rootDir/../node_modules/@notifee/react-native/android/libs"
8476
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
#Gradle 9.x is blocked by react-native-ble-plx v2.0.3. Upgrade react-native-ble-plx before bumping Gradle.
7-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
87
validateDistributionUrl=true
98
networkTimeout=10000

ios/DeveloperApp/Info.plist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
<string>To use that feature the app needs access to your media library.</string>
6868
<key>NSBluetoothAlwaysUsageDescription</key>
6969
<string>${BLUETOOTH_USAGE_DESCRIPTION}</string>
70-
<key>NSBluetoothPeripheralUsageDescription</key>
71-
<string>${BLUETOOTH_USAGE_DESCRIPTION}</string>
7270
<key>NSCalendarsUsageDescription</key>
7371
<string>${CALENDARS_USAGE_DESCRIPTION}</string>
7472
<key>NSCameraUsageDescription</key>

ios/Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ target 'DeveloperApp' do
4848
:fabric_enabled => true,
4949
:app_path => "#{Pod::Config.instance.installation_root}/.."
5050
)
51-
pod 'react-native-ble-plx', :path => '../node_modules/react-native-ble-plx'
5251
pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
5352
pod 'GoogleMaps'
5453
pod 'Google-Maps-iOS-Utils'

ios/Podfile.lock

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ PODS:
202202
- SocketRocket
203203
- SSZipArchive
204204
- Yoga
205-
- MultiplatformBleAdapter (0.1.9)
205+
- MultiplatformBleAdapter (0.2.0)
206206
- nanopb (2.30910.0):
207207
- nanopb/decode (= 2.30910.0)
208208
- nanopb/encode (= 2.30910.0)
@@ -2126,9 +2126,35 @@ PODS:
21262126
- React-RCTFBReactNativeSpec
21272127
- ReactCommon/turbomodule/core
21282128
- SocketRocket
2129-
- react-native-ble-plx (2.0.3):
2130-
- MultiplatformBleAdapter (= 0.1.9)
2129+
- react-native-ble-plx (3.5.1):
2130+
- boost
2131+
- DoubleConversion
2132+
- fast_float
2133+
- fmt
2134+
- glog
2135+
- hermes-engine
2136+
- MultiplatformBleAdapter (= 0.2.0)
2137+
- RCT-Folly
2138+
- RCT-Folly/Fabric
2139+
- RCTRequired
2140+
- RCTTypeSafety
21312141
- React-Core
2142+
- React-debug
2143+
- React-Fabric
2144+
- React-featureflags
2145+
- React-graphics
2146+
- React-ImageManager
2147+
- React-jsi
2148+
- React-NativeModulesApple
2149+
- React-RCTFabric
2150+
- React-renderercss
2151+
- React-rendererdebug
2152+
- React-utils
2153+
- ReactCodegen
2154+
- ReactCommon/turbomodule/bridging
2155+
- ReactCommon/turbomodule/core
2156+
- SocketRocket
2157+
- Yoga
21322158
- react-native-blob-util (0.24.7):
21332159
- boost
21342160
- DoubleConversion
@@ -4218,7 +4244,7 @@ SPEC CHECKSUMS:
42184244
IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485
42194245
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
42204246
MendixNative: 91822aad01e73d9afe13953415824bd451b809d9
4221-
MultiplatformBleAdapter: 5a6a897b006764392f9cef785e4360f54fb9477d
4247+
MultiplatformBleAdapter: b1fddd0d499b96b607e00f0faa8e60648343dc1d
42224248
nanopb: 438bc412db1928dac798aa6fd75726007be04262
42234249
op-sqlite: 64000c0da2357c4d73faf4d23ff34dd1ddb332d4
42244250
OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2
@@ -4261,7 +4287,7 @@ SPEC CHECKSUMS:
42614287
React-logger: 993e4b9793768764e0fdd379ad1d6582f7905463
42624288
React-Mapbuffer: 3a5f700ed673820ab4b1b35ba0cf8476400bc4c5
42634289
React-microtasksnativemodule: 094677e625f12276a8f871844a5ee6a945a90221
4264-
react-native-ble-plx: 2dd8780ee8d34c60399aaa897249ed1860ebef10
4290+
react-native-ble-plx: 152b07bdf772c95e30c0251649d462b5154a0e13
42654291
react-native-blob-util: 6dec9023ecc3ee5ac8ad377598e943f9ca63f741
42664292
react-native-cameraroll: bb98380ee21115d5fe1ae0f8b80c86e044613746
42674293
react-native-file-viewer-turbo: 360bf8416154b6c9de8c8f377fcb60d05e0f9838
@@ -4342,6 +4368,6 @@ SPEC CHECKSUMS:
43424368
VisionCamera: 7187b3dac1ff3071234ead959ce311875748e14f
43434369
Yoga: b669e79fa0f8d3f6f5e35372345f54b99e06b13c
43444370

4345-
PODFILE CHECKSUM: 8f52dd6296d40fdc351dad43ae7219a3ffac6b65
4371+
PODFILE CHECKSUM: 396738707a143c8642b47e15244bcd1cfceb797d
43464372

43474373
COCOAPODS: 1.16.2

0 commit comments

Comments
 (0)