diff --git a/src/plugin-hooks/after-prepare.js b/src/plugin-hooks/after-prepare.js index 2c29809..b029723 100755 --- a/src/plugin-hooks/after-prepare.js +++ b/src/plugin-hooks/after-prepare.js @@ -1,8 +1,8 @@ var fs = require('fs-promise'); var path = require('path'); -module.exports = function (logger, platformsData, projectData, hookArgs) { - var platform = hookArgs.platform.toLowerCase(); +module.exports = function (logger, projectData, hookArgs) { + var platform = (hookArgs && (hookArgs.platform || (hookArgs.prepareData && hookArgs.prepareData.platform)) || '').toLowerCase(); if (platform == 'ios') { var appResourcesDirectoryPath = projectData.appResourcesDirectoryPath; @@ -14,7 +14,7 @@ module.exports = function (logger, platformsData, projectData, hookArgs) { var fileToCopy = fs.existsSync(entitlementsFile) ? entitlementsFile : entitlementsFileAlt; return fs.copy(fileToCopy, dest) .then(function () { - logger.out('Copied `' + fileToCopy + '` to `' + dest + '`'); + logger.info('Copied `' + fileToCopy + '` to `' + dest + '`'); }); } diff --git a/src/plugin-hooks/before-prepare.js b/src/plugin-hooks/before-prepare.js index 8e39575..1cafb49 100755 --- a/src/plugin-hooks/before-prepare.js +++ b/src/plugin-hooks/before-prepare.js @@ -1,8 +1,8 @@ var fs = require('fs-promise'); var path = require('path'); -module.exports = function (logger, platformsData, projectData, hookArgs) { - var platform = hookArgs.platform.toLowerCase(); +module.exports = function (logger, projectData, hookArgs) { + var platform = (hookArgs && (hookArgs.platform || (hookArgs.prepareData && hookArgs.prepareData.platform)) || '').toLowerCase(); if (platform == 'ios') { var appResourcesDirectoryPath = projectData.appResourcesDirectoryPath;