// // UrlManager.swift // GMERemittance // // Created by Sujal on 12/25/17. // Copyright © 2017 Gobal Money Express Co. Ltd. All rights reserved. // import Foundation class UrlManager { static let sharedInstance = UrlManager() var version = "v1" var baseURL = "" let baseSocialURL = "" let oldUatServer = "http://gmeuat.gmeremit.com:5012/api/v1/" let staggingServerUrl = "http://gmeuat.gmeremit.com:5022/api/" let liveServerUrl = "https://mobileapi.gmeremit.com:8002/api/" let uatServer = "http://gmeuat.gmeremit.com:5012/api/" let justinServer = "https://\((GMEDB.shared.app.string(.ngrokHost) ?? "")).ngrok.io/api/" init() { switch server { case .uat: self.baseURL = uatServer case .staging: self.baseURL = staggingServerUrl case .live: self.baseURL = liveServerUrl case .uat2: self.baseURL = "http://gmeuat.gmeremit.com:5018/api/" case .kftcTest: self.baseURL = "http://gmeuat.gmeremit.com:5008/api/" case .ngrok: self.baseURL = justinServer case .testLive: self.baseURL = "http://livetest.gmeremit.com:8012/api/" } } func refreshBaseURL() { switch server { case .uat: self.baseURL = uatServer case .staging: self.baseURL = staggingServerUrl case .live: self.baseURL = liveServerUrl case .uat2: self.baseURL = "http://gmeuat.gmeremit.com:5018/api/" case .kftcTest: self.baseURL = "http://gmeuat.gmeremit.com:5008/api/" case .ngrok: self.baseURL = justinServer case .testLive: self.baseURL = "http://livetest.gmeremit.com:8012/api/" } } }