docs: function validateBranchPreferences(preferences) {
      if (preferences.projectRoot === null) {
        throw new Error(
          'BRANCH SDK: Invalid "root" in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (preferences.projectPlatform === null) {
        throw new Error(
          'BRANCH SDK: Invalid "platform" in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (preferences.projectName === null) {
        throw new Error(
          'BRANCH SDK: Invalid "name" in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (preferences.branchKey === null) {
        throw new Error(
          'BRANCH SDK: Invalid "branch-key" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        preferences.uriScheme === null ||
        !/^[a-zA-Z0-9-.]+$/.test(preferences.uriScheme)
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "uri-scheme" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        preferences.linkDomain === null ||
        !/^(?!.*?www).*([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)$/.test(
          preferences.linkDomain
        )
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "link-domain" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        preferences.iosBundleId === null ||
        !/^[a-zA-Z0-9.-]+$/.test(preferences.iosBundleId)
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "id" or "ios-CFBundleIdentifier" in <widget> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        preferences.iosTeamRelease !== null &&
        !/^[a-zA-Z0-9]{10}$/.test(preferences.iosTeamRelease)
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "ios-team-release" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        preferences.iosTeamDebug !== null &&
        !/^[a-zA-Z0-9]{10}$/.test(preferences.iosTeamDebug)
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "ios-team-debug" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        preferences.androidBundleId !== null &&
        !/^[a-zA-Z0-9._]+$/.test(preferences.androidBundleId)
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "id" or "android-packageName" in <widget> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        preferences.androidPrefix !== null &&
        !/^[/].[a-zA-Z0-9]{3,4}$/.test(preferences.androidPrefix)
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "android-prefix" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
      if (
        !(
          preferences.androidTestMode === "true" ||
          preferences.androidTestMode === "false" ||
          preferences.androidTestMode === null
        )
      ) {
        throw new Error(
          'BRANCH SDK: Invalid "android-testmode" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP'
        );
      }
    }