Link Search Menu Expand Document

Clear Storage

The Recent Searches and Bookings shown on the Landing Page are stored 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>