hot-fix crash at macOS 10.12

This commit is contained in:
qinyuhang
2016-08-14 23:18:51 +08:00
parent 83cecb7459
commit d3b4971313
+9 -4
View File
@@ -39,10 +39,6 @@ class ServerProfile: NSObject {
profile.serverPort = (data["ServerPort"] as! NSNumber).unsignedShortValue
profile.method = data["Method"] as! String
profile.password = data["Password"] as! String
profile.ssrObfs = data["ssrObfs"] as! String
profile.ssrObfsParam = data["ssrObfsParam"] as! String
profile.ssrProtocol = data["ssrProtocol"] as! String
profile.ssrProtocolParam = data["ssrProtocolParam"] as! String
if let remark = data["Remark"] {
profile.remark = remark as! String
@@ -50,6 +46,15 @@ class ServerProfile: NSObject {
if let ota = data["OTA"] {
profile.ota = ota as! Bool
}
if let ssrObfs = data["ssrObfs"] {
profile.ssrObfs = ssrObfs as! String
}
if let ssrObfsParam = data["ssrObfsParam"] {
profile.ssrObfsParam = ssrObfsParam as! String
}
if let ssrProtocol = data["ssrProtocol"] {
profile.ssrProtocol = ssrProtocol as! String
}
if let ssrProtocolParam = data["ssrProtocolParam"]{
profile.ssrProtocolParam = ssrProtocolParam as! String
}