Skip to content

Commit a5a5b5b

Browse files
committed
v1.1.19
1 parent dbdcfa1 commit a5a5b5b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Roboflow.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = "Roboflow"
3-
spec.version = "1.1.18"
3+
spec.version = "1.1.19"
44
spec.platform = :ios, '15.2'
55
spec.ios.deployment_target = '15.2'
66
spec.summary = "A framework for interfacing with Roboflow"

Sources/Roboflow/Classes/Roboflow.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public class RoboflowMobile: NSObject {
5151
clearAndRetryLoadingModel(model, modelVersion, completion)
5252
}
5353
} else if retries > 0 {
54+
clearModelCache(modelName: model, modelVersion: modelVersion)
5455
retries -= 1
5556
getModelData(modelName: model, modelVersion: modelVersion, apiKey: apiKey, deviceID: deviceID) { [self] fetchedModel, error, modelName, modelType, colors, classes in
5657
if let err = error {
@@ -171,7 +172,7 @@ public class RoboflowMobile: NSObject {
171172
private func loadModelCache(modelName: String, modelVersion: Int) -> [String: Any]? {
172173
do {
173174
if let modelInfoData = UserDefaults.standard.data(forKey: "\(modelName)-\(modelVersion)") {
174-
let decodedData = try NSKeyedUnarchiver.unarchivedObject(ofClass: NSDictionary.self, from: modelInfoData) as? [String: Any]
175+
let decodedData = try NSKeyedUnarchiver.unarchivedObject(ofClasses: [NSDictionary.self, NSString.self, NSArray.self], from: modelInfoData) as? [String: Any]
175176
return decodedData
176177
} else {
177178
print("Error: Could not find data for key \(modelName)-\(modelVersion)")

0 commit comments

Comments
 (0)