Link Search Menu Expand Document

Clear Storage

Recent searches and bookings stored by the SDK are kept within User Defaults. To remove this locally stored data, use the clearStorage function.


// Clear local storage
CarTrawlerSDK.sharedInstance().clearStorage { (error) in
  if let error = error {
      print("Storage not cleared with error:" + error.localizedDescription)
  } else {
      print("Storage cleared with success")
  }
}

It’s not possible to clear the storage while the SDK is being presented on screen.</b>