File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ let score = try? storage.object(forKey: "score")
199
199
let favoriteCharacter = try ? storage.object (forKey : " my favorite city" )
200
200
201
201
// Check if an object exists
202
- let hasFavoriteCharacter = try ? storage.existsObject (forKey : " my favorite city" )
202
+ let hasFavoriteCharacter = try ? storage.objectExists (forKey : " my favorite city" )
203
203
204
204
// Remove an object in storage
205
205
try ? storage.removeObject (forKey : " my favorite city" )
@@ -263,7 +263,7 @@ storage.async.object(forKey: "my favorite city") { result in
263
263
}
264
264
}
265
265
266
- storage.async .existsObject (forKey : " my favorite city" ) { result in
266
+ storage.async .objectExists (forKey : " my favorite city" ) { result in
267
267
if case .success (let exists) = result, exists {
268
268
print (" I have a favorite city" )
269
269
}
@@ -299,7 +299,7 @@ try? storage.setObject("This is a string", forKey: "string")
299
299
// A given expiry date will be applied to the item
300
300
try ? storage.setObject (
301
301
" This is a string" ,
302
- forKey : " string"
302
+ forKey : " string" ,
303
303
expiry : .date (Date ().addingTimeInterval (2 * 3600 ))
304
304
)
305
305
You can’t perform that action at this time.
0 commit comments