From e22dd968d7981f862cbb80452115aba20da823cc Mon Sep 17 00:00:00 2001 From: Harel Mazor Date: Thu, 23 Jul 2020 21:28:17 +0300 Subject: [PATCH 1/4] Added a copy files to after install hook --- hooks/iosAddTarget.js | 4 ++++ plugin.xml | 1 + 2 files changed, 5 insertions(+) diff --git a/hooks/iosAddTarget.js b/hooks/iosAddTarget.js index 191f4fc..295a08f 100755 --- a/hooks/iosAddTarget.js +++ b/hooks/iosAddTarget.js @@ -124,6 +124,10 @@ function parsePbxProject(context, pbxProjectPath) { function forEachShareExtensionFile(context, callback) { var shareExtensionFolder = path.join(iosFolder(context), 'ShareExtension'); + if (!fs.exists(shareExtensionFolder)) { + console.error('!! Shared extension files have not been copied yet!!'); + return; + } fs.readdirSync(shareExtensionFolder).forEach(function(name) { // Ignore junk files like .DS_Store if (!/^\..*/.test(name)) { diff --git a/plugin.xml b/plugin.xml index 0b538e1..29072b5 100644 --- a/plugin.xml +++ b/plugin.xml @@ -75,6 +75,7 @@ SOFTWARE. + From a47f397111b6de5cf28a5ede857b2d811e6376d8 Mon Sep 17 00:00:00 2001 From: Harel Mazor Date: Thu, 23 Jul 2020 21:43:50 +0300 Subject: [PATCH 2/4] Fix async call --- hooks/iosAddTarget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/iosAddTarget.js b/hooks/iosAddTarget.js index 295a08f..dfb095c 100755 --- a/hooks/iosAddTarget.js +++ b/hooks/iosAddTarget.js @@ -124,7 +124,7 @@ function parsePbxProject(context, pbxProjectPath) { function forEachShareExtensionFile(context, callback) { var shareExtensionFolder = path.join(iosFolder(context), 'ShareExtension'); - if (!fs.exists(shareExtensionFolder)) { + if (!fs.existsSync(shareExtensionFolder)) { console.error('!! Shared extension files have not been copied yet!!'); return; } From 7d6fa27554bb1980d3985f097462963071962701 Mon Sep 17 00:00:00 2001 From: Harel Mazor Date: Sun, 26 Jul 2020 10:40:26 +0300 Subject: [PATCH 3/4] Change code sign indentity and style --- hooks/iosAddTarget.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hooks/iosAddTarget.js b/hooks/iosAddTarget.js index dfb095c..f721547 100755 --- a/hooks/iosAddTarget.js +++ b/hooks/iosAddTarget.js @@ -320,6 +320,8 @@ module.exports = function (context) { if (productName.indexOf('ShareExt') >= 0) { buildSettingsObj['PROVISIONING_PROFILE'] = PROVISIONING_PROFILE; buildSettingsObj['DEVELOPMENT_TEAM'] = DEVELOPMENT_TEAM; + buildSettingsObj['CODE_SIGN_STYLE'] = 'Manual'; + buildSettingsObj['CODE_SIGN_IDENTITY'] = 'iPhone Distribution'; console.log('Added signing identities for extension!'); } } From bb167ed427b59215407fd4ce7296e5a669a4f762 Mon Sep 17 00:00:00 2001 From: Harel Mazor Date: Sun, 26 Jul 2020 10:55:38 +0300 Subject: [PATCH 4/4] Fix missing quotes --- hooks/iosAddTarget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/iosAddTarget.js b/hooks/iosAddTarget.js index f721547..3b88ed1 100755 --- a/hooks/iosAddTarget.js +++ b/hooks/iosAddTarget.js @@ -321,7 +321,7 @@ module.exports = function (context) { buildSettingsObj['PROVISIONING_PROFILE'] = PROVISIONING_PROFILE; buildSettingsObj['DEVELOPMENT_TEAM'] = DEVELOPMENT_TEAM; buildSettingsObj['CODE_SIGN_STYLE'] = 'Manual'; - buildSettingsObj['CODE_SIGN_IDENTITY'] = 'iPhone Distribution'; + buildSettingsObj['CODE_SIGN_IDENTITY'] = '"iPhone Distribution"'; console.log('Added signing identities for extension!'); } }