code: private void writeOnDisk(JSONObject plistJSON, File destination)
        throws IOException, JSONException {
      if (destination.exists()) {
        // This is possible if we start with capability "reuseContentAndSettings"
        log.info(destination + " already exists. Overwriting data");
      }
  
      // make sure the folder is ready for the plist file
      destination.getParentFile().mkdirs();
  
      checkPlUtil();
  
      File from = createTmpFile(plistJSON);
  
      List<String> command = new ArrayList<>();
      command.add(PLUTIL);
      command.add("-convert");
      command.add("binary1");
      command.add("-o");
      command.add(destination.getAbsolutePath());
      command.add(from.getAbsolutePath());
  
      ProcessBuilder b = new ProcessBuilder(command);
      int i;
      try {
        Process p = b.start();
        i = p.waitFor();
      } catch (Exception e) {
        throw new WebDriverException("failed to run " + command.toString(), e);
      }
      if (i != 0) {
        throw new WebDriverException("conversion to binary plist failed. exitCode=" + i);
      }
    }
docs: TODO use plist utils.