freerasp-react-native 4.2.0 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.2.2] - 2025-08-21
9
+
10
+ - iOS SDK version: 6.12.1
11
+ - Android SDK version: 16.0.1
12
+
13
+ ### React Native
14
+
15
+ #### Changed
16
+
17
+ - Replaced deprecated `getCurrentActivity()` call on Android (compatibility with RN 0.81+)
18
+
19
+ ## [4.2.1] - 2025-08-05
20
+
21
+ - iOS SDK version: 6.12.1
22
+ - Android SDK version: 16.0.1
23
+
24
+ ### React Native
25
+
26
+ #### Fixed
27
+
28
+ - Possible conflict with other packages during proguard code minification
29
+
30
+ ### Android
31
+
32
+ #### Fixed
33
+
34
+ - Issue with empty `SharedPreferences` files
35
+
36
+ #### Changed
37
+
38
+ - Decreased version of `Kotlin` to `2.0.0`
39
+
8
40
  ## [4.2.0] - 2025-07-16
9
41
 
10
42
  - iOS SDK version: 6.12.1
@@ -99,7 +99,7 @@ dependencies {
99
99
  implementation "com.facebook.react:react-native:$react_native_version"
100
100
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
101
101
  implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1"
102
- implementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:16.0.1"
102
+ implementation "com.aheaditec.talsec.security:TalsecSecurity-Community-ReactNative:16.0.2"
103
103
  }
104
104
 
105
105
  if (isNewArchitectureEnabled()) {
@@ -8,3 +8,5 @@
8
8
 
9
9
  -keep class com.freeraspreactnative.models.RNSuspiciousAppInfo$Companion
10
10
  -keep class com.freeraspreactnative.models.RNPackageInfo$Companion
11
+
12
+ -repackageclasses 'ts'
@@ -33,13 +33,13 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
33
33
  private val lifecycleListener = object : LifecycleEventListener {
34
34
  override fun onHostResume() {
35
35
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
36
- currentActivity?.let { ScreenProtector.register(it) }
36
+ reactContext.currentActivity?.let { ScreenProtector.register(it) }
37
37
  }
38
38
  }
39
39
 
40
40
  override fun onHostPause() {
41
41
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
42
- currentActivity?.let { ScreenProtector.unregister(it) }
42
+ reactContext.currentActivity?.let { ScreenProtector.unregister(it) }
43
43
  }
44
44
  }
45
45
 
@@ -71,7 +71,7 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
71
71
  mainHandler.post {
72
72
  talsecStarted = true
73
73
  // This code must be called only AFTER Talsec.start
74
- currentActivity?.let { activity ->
74
+ reactContext.currentActivity?.let { activity ->
75
75
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
76
76
  ScreenProtector.register(activity)
77
77
  }
@@ -154,7 +154,7 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
154
154
  */
155
155
  @ReactMethod
156
156
  fun blockScreenCapture(enable: Boolean, promise: Promise) {
157
- val activity = currentActivity ?: run {
157
+ val activity = reactContext.currentActivity ?: run {
158
158
  promise.reject(
159
159
  "NativePluginError", "Cannot block screen capture, activity is null."
160
160
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freerasp-react-native",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "description": "React Native plugin for improving app security and threat monitoring on Android and iOS mobile devices.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",