From 44a7ac1ff2656ae5f3fbc6b0d29ed6221a80d95e Mon Sep 17 00:00:00 2001 From: Harsha Bonthu Date: Wed, 14 Jun 2017 15:24:12 -0500 Subject: [PATCH 1/2] fix: move before_prepare and after_prepare hooks to after_plugin install, add This fixes the bug mentioned here: https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/333 --- plugin.template.xml | 4 ++-- src/scripts/hooks/{afterPrepare.js => afterPluginAdd.js} | 2 +- src/scripts/hooks/{beforePrepare.js => afterPluginInstall.js} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/scripts/hooks/{afterPrepare.js => afterPluginAdd.js} (94%) rename src/scripts/hooks/{beforePrepare.js => afterPluginInstall.js} (91%) diff --git a/plugin.template.xml b/plugin.template.xml index cce2919f..f9d97d3e 100644 --- a/plugin.template.xml +++ b/plugin.template.xml @@ -43,8 +43,8 @@ SOFTWARE. - - + + diff --git a/src/scripts/hooks/afterPrepare.js b/src/scripts/hooks/afterPluginAdd.js similarity index 94% rename from src/scripts/hooks/afterPrepare.js rename to src/scripts/hooks/afterPluginAdd.js index ebb37608..1c86868e 100644 --- a/src/scripts/hooks/afterPrepare.js +++ b/src/scripts/hooks/afterPluginAdd.js @@ -15,7 +15,7 @@ // after prepare hooks based on platform function run (context) { var preferences = configPreferences.read(context) - var platforms = context.opts.platforms + var platforms = context.opts.cordova.platforms platforms.forEach(function (platform) { if (platform === ANDROID) { diff --git a/src/scripts/hooks/beforePrepare.js b/src/scripts/hooks/afterPluginInstall.js similarity index 91% rename from src/scripts/hooks/beforePrepare.js rename to src/scripts/hooks/afterPluginInstall.js index 3b303bac..225fa7c4 100644 --- a/src/scripts/hooks/beforePrepare.js +++ b/src/scripts/hooks/afterPluginInstall.js @@ -11,7 +11,7 @@ // after prepare hooks based on platform function run (context) { var preferences = configPreferences.read(context) - var platforms = context.opts.platforms + var platforms = context.opts.cordova.platforms platforms.forEach(function (platform) { if (platform === IOS) { From ef75476a82bdff8fef4e4027d6215399cd9f29a3 Mon Sep 17 00:00:00 2001 From: Harsha Bonthu Date: Wed, 14 Jun 2017 15:24:14 -0500 Subject: [PATCH 2/2] chore: updated npm version to 2.6.1 --- package.json | 2 +- plugin.template.xml | 2 +- plugin.xml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3b05ec37..52e8b3ee 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "branch-cordova-sdk", "description": "Branch Metrics Cordova SDK", "main": "www/branch.js", - "version": "2.6.0", + "version": "2.6.1", "homepage": "https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking", "repository": { "type": "git", diff --git a/plugin.template.xml b/plugin.template.xml index f9d97d3e..5504ec32 100644 --- a/plugin.template.xml +++ b/plugin.template.xml @@ -24,7 +24,7 @@ SOFTWARE. + version="2.6.1"> diff --git a/plugin.xml b/plugin.xml index 9bd4ebe3..4f51a00f 100644 --- a/plugin.xml +++ b/plugin.xml @@ -24,7 +24,7 @@ SOFTWARE. + version="2.6.1"> @@ -43,8 +43,8 @@ SOFTWARE. - - + +