spotny-sdk 1.0.31 → 1.0.33

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.
@@ -67,7 +67,4 @@ dependencies {
67
67
 
68
68
  // AltBeacon — iBeacon scanning for Android
69
69
  implementation "org.altbeacon:android-beacon-library:2.20.5"
70
-
71
- // Encrypted storage — mirrors iOS Keychain security level
72
- implementation "androidx.security:security-crypto:1.0.0"
73
70
  }
@@ -7,8 +7,6 @@ import android.os.Build
7
7
  import android.os.RemoteException
8
8
  import android.util.Log
9
9
  import androidx.core.app.NotificationCompat
10
- import androidx.security.crypto.EncryptedSharedPreferences
11
- import androidx.security.crypto.MasterKey
12
10
  import com.facebook.react.bridge.*
13
11
  import com.facebook.react.modules.core.DeviceEventManagerModule
14
12
  import org.altbeacon.beacon.*
@@ -451,25 +449,8 @@ class SpotnySdkModule(private val reactContext: ReactApplicationContext) :
451
449
 
452
450
  // ── Helpers ───────────────────────────────────────────────────────────────
453
451
 
454
- /** Returns EncryptedSharedPreferences backed by Android Keystore (AES-256).
455
- * Falls back to plain SharedPreferences on the rare Keystore initialisation failure. */
456
- private fun prefs(): android.content.SharedPreferences {
457
- return try {
458
- val masterKey = MasterKey.Builder(reactContext)
459
- .setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
460
- .build()
461
- EncryptedSharedPreferences.create(
462
- reactContext,
463
- "SpotnySDK_secure",
464
- masterKey,
465
- EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
466
- EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
467
- )
468
- } catch (e: Exception) {
469
- Log.w(TAG, "EncryptedSharedPreferences unavailable, using plain prefs: ${e.message}")
470
- reactContext.getSharedPreferences("SpotnySDK", Context.MODE_PRIVATE)
471
- }
472
- }
452
+ private fun prefs(): android.content.SharedPreferences =
453
+ reactContext.getSharedPreferences("SpotnySDK", Context.MODE_PRIVATE)
473
454
 
474
455
  private fun beaconKey(major: Int, minor: Int) = "${major}_${minor}"
475
456
 
@@ -50,13 +50,11 @@ public class SpotnyBeaconScanner: NSObject {
50
50
  private var lastRangedEmit: Date = .distantPast
51
51
 
52
52
  // ── Configuration ────────────────────────────────────────────────────────────
53
- // backendURL and kontaktAPIKey are fixed not overridable by consumers.
54
- // backendURL is var to allow owner-only debug override via superDebugConfig in initialize().
53
+ // backendURL is owner-only overridable via superDebugConfig in initialize().
55
54
  private var backendURL: String = "https://api.spotny.app"
56
55
  /// When true, full API response bodies (success and error) are printed to the console.
57
56
  private var debugMode: Bool = false
58
57
  private let apiBasePath: String = "/api/app/sdk"
59
- private let kontaktAPIKey: String = "mgrz08TOKNHafeY02cWIs9mxUHbynNQJ"
60
58
  private var maxDetectionDistance: Double = 8.0
61
59
  /// Multiplier applied to raw RSSI-derived distance. Default 1.0 — CLBeacon.accuracy
62
60
  /// already accounts for TX power via Apple's measuredPower algorithm, so no correction
@@ -116,10 +114,6 @@ public class SpotnyBeaconScanner: NSObject {
116
114
  // MARK: - Setup
117
115
 
118
116
  private func setupManagers() {
119
- // Initialise the Kontakt.io SDK with the API key before creating any manager
120
- Kontakt.setAPIKey(kontaktAPIKey)
121
- print("✅ SpotnySDK: Kontakt.io SDK initialised")
122
-
123
117
  locationManager = CLLocationManager()
124
118
  locationManager.delegate = self
125
119
  // allowsBackgroundLocationUpdates = true requires the app to declare the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spotny-sdk",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "Beacon Scanner",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",