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")
199199let favoriteCharacter = try ? storage.object (forKey : " my favorite city" )
200200
201201// 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" )
203203
204204// Remove an object in storage
205205try ? storage.removeObject (forKey : " my favorite city" )
@@ -263,7 +263,7 @@ storage.async.object(forKey: "my favorite city") { result in
263263 }
264264}
265265
266- storage.async .existsObject (forKey : " my favorite city" ) { result in
266+ storage.async .objectExists (forKey : " my favorite city" ) { result in
267267 if case .success (let exists) = result, exists {
268268 print (" I have a favorite city" )
269269 }
@@ -299,7 +299,7 @@ try? storage.setObject("This is a string", forKey: "string")
299299// A given expiry date will be applied to the item
300300try ? storage.setObject (
301301 " This is a string" ,
302- forKey : " string"
302+ forKey : " string" ,
303303 expiry : .date (Date ().addingTimeInterval (2 * 3600 ))
304304)
305305
You can’t perform that action at this time.
0 commit comments