|
|
|
|
@ -18,6 +18,12 @@ struct PenguinModel {
|
|
|
|
|
let mapBoxKey: String
|
|
|
|
|
let clientID: String
|
|
|
|
|
let positionServiceName: String
|
|
|
|
|
let username: String
|
|
|
|
|
let isSimulationModeEnabled: Bool
|
|
|
|
|
let isShowUserName: Bool
|
|
|
|
|
let isUpdateUserLocationSmoothly: Bool
|
|
|
|
|
let isEnableReportIssue: Bool
|
|
|
|
|
let languageCode: String
|
|
|
|
|
|
|
|
|
|
// Initialize the model from a dictionary
|
|
|
|
|
init?(from dictionary: [String: Any]) {
|
|
|
|
|
@ -30,7 +36,13 @@ struct PenguinModel {
|
|
|
|
|
let storyboardName = dictionary["storyboardName"] as? String,
|
|
|
|
|
let mapBoxKey = dictionary["mapBoxKey"] as? String,
|
|
|
|
|
let clientID = dictionary["clientID"] as? String,
|
|
|
|
|
let positionServiceName = dictionary["positionServiceName"] as? String
|
|
|
|
|
let positionServiceName = dictionary["positionServiceName"] as? String,
|
|
|
|
|
let username = dictionary["username"] as? String,
|
|
|
|
|
let isSimulationModeEnabled = dictionary["isSimulationModeEnabled"] as? Bool,
|
|
|
|
|
let isShowUserName = dictionary["isShowUserName"] as? Bool,
|
|
|
|
|
let isUpdateUserLocationSmoothly = dictionary["isUpdateUserLocationSmoothly"] as? Bool,
|
|
|
|
|
let isEnableReportIssue = dictionary["isEnableReportIssue"] as? Bool,
|
|
|
|
|
let languageCode = dictionary["languageCode"] as? String
|
|
|
|
|
else {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
@ -44,5 +56,12 @@ struct PenguinModel {
|
|
|
|
|
self.mapBoxKey = mapBoxKey
|
|
|
|
|
self.clientID = clientID
|
|
|
|
|
self.positionServiceName = positionServiceName
|
|
|
|
|
self.username = username
|
|
|
|
|
self.isSimulationModeEnabled = isSimulationModeEnabled
|
|
|
|
|
self.isEnableReportIssue = isEnableReportIssue
|
|
|
|
|
self.isShowUserName = isShowUserName
|
|
|
|
|
self.isUpdateUserLocationSmoothly = isUpdateUserLocationSmoothly
|
|
|
|
|
self.languageCode = languageCode
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|