code: public String getSafariSDKVersion() {
      validateSafariSDKVersionMethodCall();
      Matcher sdkVersionMatcher = SAFARI_SDK_VERSION.matcher(app.getAbsolutePath());
      if (sdkVersionMatcher.matches()) {
        return sdkVersionMatcher.group(1) != null ? sdkVersionMatcher.group(1) : sdkVersionMatcher.group(2);
      } else {
        throw new WebDriverException("Cannot identify the version of Safari from application: " + app.getAbsolutePath());
      }
    }
docs: Returns the Safari SDK version from the location of the application, will throw {@link WebDriverException} if
  called on a Non Safari application.
  
  @return Safari SDK version