spotny-sdk 1.0.9 → 1.0.10
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.
|
@@ -52,7 +52,8 @@ public class SpotnyBeaconScanner: NSObject {
|
|
|
52
52
|
|
|
53
53
|
// ── Configuration ────────────────────────────────────────────────────────────
|
|
54
54
|
// backendURL and kontaktAPIKey are fixed — not overridable by consumers.
|
|
55
|
-
|
|
55
|
+
// backendURL is var to allow owner-only debug override via superDebugConfig in initialize().
|
|
56
|
+
private var backendURL: String = "https://api.spotny.app"
|
|
56
57
|
private let apiBasePath: String = "/api/app/sdk"
|
|
57
58
|
private let kontaktAPIKey: String = "mgrz08TOKNHafeY02cWIs9mxUHbynNQJ"
|
|
58
59
|
private var maxDetectionDistance: Double = 8.0
|
|
@@ -232,6 +233,12 @@ public class SpotnyBeaconScanner: NSObject {
|
|
|
232
233
|
if let uid = config["identifierId"] as? String, !uid.isEmpty {
|
|
233
234
|
identifierId = uid
|
|
234
235
|
}
|
|
236
|
+
// Owner-only: pass superDebugConfig: { backendURL: "http://localhost:3000" } to hit a local server
|
|
237
|
+
if let debugCfg = config["superDebugConfig"] as? [String: Any],
|
|
238
|
+
let url = debugCfg["backendURL"] as? String, !url.isEmpty {
|
|
239
|
+
backendURL = url
|
|
240
|
+
print("⚠️ [OWNER DEBUG] SpotnySDK: backendURL overridden → \(backendURL)")
|
|
241
|
+
}
|
|
235
242
|
guard let token = config["token"] as? String, !token.isEmpty else {
|
|
236
243
|
reject("MISSING_TOKEN", "initialize() requires a token", nil)
|
|
237
244
|
return
|