Showing
2 changed files
with
15 additions
and
28 deletions
| ... | @@ -168,15 +168,15 @@ public struct Configuration { | ... | @@ -168,15 +168,15 @@ public struct Configuration { |
| 168 | 168 | ||
| 169 | var baseURL: String { | 169 | var baseURL: String { |
| 170 | switch self { | 170 | switch self { |
| 171 | - case .development: return "https://engage-stage.warp.ly" | 171 | + case .development: return "https://engage-uat.dei.gr" |
| 172 | - case .production: return "https://engage.warp.ly" | 172 | + case .production: return "https://engage-prod.dei.gr" |
| 173 | } | 173 | } |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | var host: String { | 176 | var host: String { |
| 177 | switch self { | 177 | switch self { |
| 178 | - case .development: return "engage-stage.warp.ly" | 178 | + case .development: return "engage-uat.dei.gr" |
| 179 | - case .production: return "engage.warp.ly" | 179 | + case .production: return "engage-prod.dei.gr" |
| 180 | } | 180 | } |
| 181 | } | 181 | } |
| 182 | } | 182 | } |
| ... | @@ -275,7 +275,7 @@ public final class WarplySDK { | ... | @@ -275,7 +275,7 @@ public final class WarplySDK { |
| 275 | * @param language The default language code for localized content (defaults to "el") | 275 | * @param language The default language code for localized content (defaults to "el") |
| 276 | * | 276 | * |
| 277 | * @discussion This method configures: | 277 | * @discussion This method configures: |
| 278 | - * - Base URL based on environment (development: engage-stage.warp.ly, production: engage.warp.ly) | 278 | + * - Base URL based on environment (development: engage-uat.dei.gr, production: engage-prod.dei.gr) |
| 279 | * - Internal storage for appUuid and merchantId | 279 | * - Internal storage for appUuid and merchantId |
| 280 | * - Default language for API requests | 280 | * - Default language for API requests |
| 281 | * | 281 | * |
| ... | @@ -286,16 +286,16 @@ public final class WarplySDK { | ... | @@ -286,16 +286,16 @@ public final class WarplySDK { |
| 286 | * ```swift | 286 | * ```swift |
| 287 | * // Development environment | 287 | * // Development environment |
| 288 | * WarplySDK.shared.configure( | 288 | * WarplySDK.shared.configure( |
| 289 | - * appUuid: "f83dfde1145e4c2da69793abb2f579af", | 289 | + * appUuid: "d5f9038f46374666a1f4e1039d89f608", |
| 290 | - * merchantId: "20113", | 290 | + * merchantId: "", |
| 291 | * environment: .development, | 291 | * environment: .development, |
| 292 | * language: "el" | 292 | * language: "el" |
| 293 | * ) | 293 | * ) |
| 294 | * | 294 | * |
| 295 | * // Production environment | 295 | * // Production environment |
| 296 | * WarplySDK.shared.configure( | 296 | * WarplySDK.shared.configure( |
| 297 | - * appUuid: "0086a2088301440792091b9f814c2267", | 297 | + * appUuid: "d5f9038f46374666a1f4e1039d89f608", |
| 298 | - * merchantId: "58763", | 298 | + * merchantId: "", |
| 299 | * environment: .production, | 299 | * environment: .production, |
| 300 | * language: "el" | 300 | * language: "el" |
| 301 | * ) | 301 | * ) |
| ... | @@ -318,16 +318,6 @@ public final class WarplySDK { | ... | @@ -318,16 +318,6 @@ public final class WarplySDK { |
| 318 | print("✅ [WarplySDK] Environment configured: \(storage.environment)") | 318 | print("✅ [WarplySDK] Environment configured: \(storage.environment)") |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | - /// Set environment (development/production) | ||
| 322 | - public func setEnvironment(_ isDev: Bool) { | ||
| 323 | - if isDev { | ||
| 324 | - storage.appUuid = "f83dfde1145e4c2da69793abb2f579af" | ||
| 325 | - storage.merchantId = "20113" | ||
| 326 | - } else { | ||
| 327 | - storage.appUuid = "0086a2088301440792091b9f814c2267" | ||
| 328 | - storage.merchantId = "58763" | ||
| 329 | - } | ||
| 330 | - } | ||
| 331 | 321 | ||
| 332 | /** | 322 | /** |
| 333 | * Initialize the SDK and perform automatic device registration | 323 | * Initialize the SDK and perform automatic device registration | ... | ... |
| ... | @@ -70,7 +70,7 @@ public final class NetworkService: NetworkServiceProtocol { | ... | @@ -70,7 +70,7 @@ public final class NetworkService: NetworkServiceProtocol { |
| 70 | private let session: URLSession | 70 | private let session: URLSession |
| 71 | private var baseURL: String { | 71 | private var baseURL: String { |
| 72 | // Dynamic baseURL that always reads from Configuration | 72 | // Dynamic baseURL that always reads from Configuration |
| 73 | - return Configuration.baseURL.isEmpty ? "https://engage-stage.warp.ly" : Configuration.baseURL | 73 | + return Configuration.baseURL.isEmpty ? "https://engage-uat.dei.gr" : Configuration.baseURL |
| 74 | } | 74 | } |
| 75 | private let networkMonitor: NWPathMonitor | 75 | private let networkMonitor: NWPathMonitor |
| 76 | private let monitorQueue = DispatchQueue(label: "NetworkMonitor") | 76 | private let monitorQueue = DispatchQueue(label: "NetworkMonitor") |
| ... | @@ -570,15 +570,12 @@ public final class NetworkService: NetworkServiceProtocol { | ... | @@ -570,15 +570,12 @@ public final class NetworkService: NetworkServiceProtocol { |
| 570 | 570 | ||
| 571 | /// Get environment string for map data endpoints | 571 | /// Get environment string for map data endpoints |
| 572 | private func getEnvironment() -> String { | 572 | private func getEnvironment() -> String { |
| 573 | - // Determine environment based on app UUID or configuration | 573 | + // Use stored environment from WarplySDK |
| 574 | - let appUuid = getAppUUID() | 574 | + if let storedEnvironment = UserDefaults.standard.string(forKey: "environmentUD") { |
| 575 | - | 575 | + return storedEnvironment == "development" ? "dev" : "prod" |
| 576 | - // Development environment UUID | ||
| 577 | - if appUuid == "f83dfde1145e4c2da69793abb2f579af" { | ||
| 578 | - return "dev" | ||
| 579 | - } else { | ||
| 580 | - return "prod" | ||
| 581 | } | 576 | } |
| 577 | + // Fallback to production | ||
| 578 | + return "prod" | ||
| 582 | } | 579 | } |
| 583 | 580 | ||
| 584 | 581 | ... | ... |
-
Please register or login to post a comment