mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-21 07:47:40 +00:00
Adds error-checking on version
This commit is contained in:
parent
32084ab38d
commit
0830670c2b
1 changed files with 5 additions and 0 deletions
|
|
@ -707,6 +707,11 @@ public class Manager: NSObject, UIGestureRecognizerDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
// Version uses a 'conditional initializer'. If it fails, the version info is invalid.
|
||||
guard let _ = Version(version) else {
|
||||
throw KMPError.invalidPackage
|
||||
}
|
||||
|
||||
if let lexicalModels = jsonResult["lexicalModels"] as? [[String:AnyObject]] {
|
||||
for k in lexicalModels {
|
||||
let name = k["name"] as! String
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue