hooks/afterPrepareHook.js
function run(cordovaContext) {
  var pluginPreferences = configParser.readPreferences(cordovaContext);
  var platformsList = cordovaContext.opts.platforms;

  // if no preferences are found - exit
  if (pluginPreferences == null) {
    return;
  }

  // if no host is defined - exit
  if (pluginPreferences.hosts == null || pluginPreferences.hosts.length == 0) {
    console.warn('No host is specified in the config.xml. Universal Links plugin is not going to work.');
    return;
  }

  platformsList.forEach(function(platform) {
    switch (platform) {
      case ANDROID:
        {
          activateUniversalLinksInAndroid(cordovaContext, pluginPreferences);
          break;
        }
      case IOS:
        {
          activateUniversalLinksInIos(cordovaContext, pluginPreferences);
          break;
        }
    }
  });
}
function run(cordovaContext) {
  var pluginPreferences = configParser.readPreferences(cordovaContext);
  var platformsList = cordovaContext.opts.platforms;

  // if no preferences are found - exit
  if (pluginPreferences == null) {
    return;
  }

  // if no host is defined - exit
  if (pluginPreferences.hosts == null || pluginPreferences.hosts.length == 0) {
    console.warn('No host is specified in the config.xml. Universal Links plugin is not going to work.');
    return;
  }

  platformsList.forEach(function(platform) {
    switch (platform) {
      case ANDROID:
        {
          activateUniversalLinksInAndroid(cordovaContext, pluginPreferences);
          break;
        }
      case IOS:
        {
          activateUniversalLinksInIos(cordovaContext, pluginPreferences);
          break;
        }
    }
  });
}
function run ( cordovaContext ) { var pluginPreferences = configParser . readPreferences ( cordovaContext ) ; var platformsList = cordovaContext . opts . platforms ; // if no preferences are found - exit if ( pluginPreferences == null ) { return ; } // if no host is defined - exit if ( pluginPreferences . hosts == null || pluginPreferences . hosts . length == 0 ) { console . warn ( 'No host is specified in the config.xml. Universal Links plugin is not going to work.' ) ; return ; } platformsList . forEach ( function ( platform ) { switch ( platform ) { case ANDROID : { activateUniversalLinksInAndroid ( cordovaContext , pluginPreferences ) ; break ; } case IOS : { activateUniversalLinksInIos ( cordovaContext , pluginPreferences ) ; break ; } } } ) ; }
Execute hook.

@param {Object} cordovaContext - cordova context object
Execute hook .