/**
  * Clean/scrub the particular application on Simulator.
  * @override
  *
  * @param {string} appFile - Application name minus ".app".
  * @param {string} appBundleId - Bundle identifier of the application.
  * @param {boolean} scrub - If `scrub` is false, we want to clean by deleting the app and all
  *   files associated with it. If `scrub` is true, we just want to delete the preferences and
  *   changed files.
  */
 async cleanCustomApp (appFile, appBundleId, scrub = false) {
   try {
     await terminate(this.udid, appBundleId);
   } catch (ign) {
     // ignore error
   }
   await super.cleanCustomApp(appFile, appBundleId, scrub);
 }
 /**
  * Clean up the directories for mobile Safari.
  * @override
  *
  * @param {boolean} keepPrefs - Whether to keep Safari preferences from being deleted.
  */
 async cleanSafari (keepPrefs = true) {
   try {
     if (await this.isRunning()) {
       await terminate(this.udid, MOBILE_SAFARI_BUNDLE_ID);
     }
   } catch (ign) {
     // ignore error
   }
   await super.cleanSafari(keepPrefs);
 }