From 492e11c9a5607d5e59e7b890a42083ca0a36012e Mon Sep 17 00:00:00 2001 From: jchau207 Date: Wed, 9 Jan 2019 01:27:38 -0800 Subject: [PATCH 01/11] Added script to import ios scheme --- app-template/bitcoincom/BETA.xcscheme | 91 ++++++++++++++++++++++++ app-template/bitcoincom/import_scheme.sh | 21 ++++++ 2 files changed, 112 insertions(+) create mode 100644 app-template/bitcoincom/BETA.xcscheme create mode 100755 app-template/bitcoincom/import_scheme.sh diff --git a/app-template/bitcoincom/BETA.xcscheme b/app-template/bitcoincom/BETA.xcscheme new file mode 100644 index 000000000..59bdd6fe3 --- /dev/null +++ b/app-template/bitcoincom/BETA.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app-template/bitcoincom/import_scheme.sh b/app-template/bitcoincom/import_scheme.sh new file mode 100755 index 000000000..412c6c45d --- /dev/null +++ b/app-template/bitcoincom/import_scheme.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Set to your project and scheme + +export PROJECT_FILE="../../platforms/ios/Bitcoin.com Wallet.xcodeproj" +export SCHEME="BETA.xcscheme" +export TEST="../../platforms/ios" + +# Generate path to shared schemes folder +export SCHEMES="$PROJECT_FILE/xcshareddata/xcschemes" +export DEST="$SCHEMES/$SCHEME" + +if [ ! -f "$DEST" ]; then + + # Create folder if necessary + echo making directory $SCHEMES + mkdir -p $SCHEMES + + # Copy scheme + cp "${SCHEME}" "$DEST" +fi \ No newline at end of file From ea7eb9fb6e27e2ceee559beb923cb7ed0d0d4fcd Mon Sep 17 00:00:00 2001 From: jchau207 Date: Wed, 9 Jan 2019 02:43:34 -0800 Subject: [PATCH 02/11] fixed import script --- app-template/bitcoincom/import_scheme.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app-template/bitcoincom/import_scheme.sh b/app-template/bitcoincom/import_scheme.sh index 412c6c45d..d4ad27e49 100755 --- a/app-template/bitcoincom/import_scheme.sh +++ b/app-template/bitcoincom/import_scheme.sh @@ -2,20 +2,18 @@ # Set to your project and scheme -export PROJECT_FILE="../../platforms/ios/Bitcoin.com Wallet.xcodeproj" -export SCHEME="BETA.xcscheme" -export TEST="../../platforms/ios" +export PROJECT_FILE='../../platforms/ios/Bitcoin.com Wallet.xcodeproj' +export SCHEME='BETA.xcscheme' # Generate path to shared schemes folder -export SCHEMES="$PROJECT_FILE/xcshareddata/xcschemes" -export DEST="$SCHEMES/$SCHEME" -if [ ! -f "$DEST" ]; then +export SCHEMES="$PROJECT_FILE"/xcshareddata/xcschemes + +if [ ! -f "$SCHEMES/$SCHEME" ]; then # Create folder if necessary - echo making directory $SCHEMES - mkdir -p $SCHEMES + mkdir -p "$SCHEMES" # Copy scheme - cp "${SCHEME}" "$DEST" + cp $SCHEME "$SCHEMES/$SCHEME" fi \ No newline at end of file From 6d1772aa625090c5abe2ae90b07490c069687514 Mon Sep 17 00:00:00 2001 From: jchau207 Date: Wed, 9 Jan 2019 03:03:25 -0800 Subject: [PATCH 03/11] modified Gruntfile to build specific scheme --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 6da3084d7..88c336fd7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -21,13 +21,13 @@ module.exports = function(grunt) { command: 'cordova prepare android && cordova build android --release', }, build_ios_debug: { - command: 'cordova prepare ios && cordova build ios --debug --buildFlag="-UseModernBuildSystem=0"', + command: 'cordova prepare ios && cordova build ios --debug --buildFlag="-UseModernBuildSystem=0" --buildFlag="-scheme BETA"', options: { maxBuffer: 3200 * 1024 } }, build_ios_release: { - command: 'cordova prepare ios && cordova build ios --release --buildFlag="-UseModernBuildSystem=0"', + command: 'cordova prepare ios && cordova build ios --release --buildFlag="-UseModernBuildSystem=0" --buildFlag="-scheme Bitcoin.com Wallet"', options: { maxBuffer: 3200 * 1024 } From 7d31308105a49cef308f2ff2e517a3e4c22193d5 Mon Sep 17 00:00:00 2001 From: jchau207 Date: Wed, 9 Jan 2019 03:19:24 -0800 Subject: [PATCH 04/11] added hook to run import script --- app-template/bitcoincom/import_scheme.sh | 2 ++ app-template/config-template.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/app-template/bitcoincom/import_scheme.sh b/app-template/bitcoincom/import_scheme.sh index d4ad27e49..4f6d31a96 100755 --- a/app-template/bitcoincom/import_scheme.sh +++ b/app-template/bitcoincom/import_scheme.sh @@ -9,6 +9,8 @@ export SCHEME='BETA.xcscheme' export SCHEMES="$PROJECT_FILE"/xcshareddata/xcschemes +cd "$(dirname "$0")" + if [ ! -f "$SCHEMES/$SCHEME" ]; then # Create folder if necessary diff --git a/app-template/config-template.xml b/app-template/config-template.xml index f6f99a2e4..f370712a0 100644 --- a/app-template/config-template.xml +++ b/app-template/config-template.xml @@ -82,6 +82,7 @@ + From 0c222da47eb288831e925524e4dea168819c7575 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Sun, 13 Jan 2019 17:32:59 -0600 Subject: [PATCH 05/11] Started bash script for annotating the app icon. --- app-template/annotate_icon.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 app-template/annotate_icon.sh diff --git a/app-template/annotate_icon.sh b/app-template/annotate_icon.sh new file mode 100755 index 000000000..eb4504fe5 --- /dev/null +++ b/app-template/annotate_icon.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +FOLDER_NAME=$1 +DEST_FOLDER_RELATIVE=../resources/bitcoin.com/ios/icon/$FOLDER_NAME + +mkdir $DEST_FOLDER_RELATIVE +convert '../resources/bitcoin.com/ios/icon/icon-1024.png' -gravity center -pointsize 144 -fill '#003eaa' -draw "fill #003eaa rotate -45 rectangle -500,1035,500,1200" -draw "fill white font 'bitcoincom/fonts/ProximaNova-ExtraBold.otf' rotate -45 text 0,400 'DEBUG'" $DEST_FOLDER_RELATIVE/icon-1024.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 120x120 $DEST_FOLDER_RELATIVE/icon-120.png \ No newline at end of file From 90e309f1c4822df607f058c101fe8af9959ba760 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Sun, 13 Jan 2019 17:43:40 -0600 Subject: [PATCH 06/11] Command line parameters for icon text and color. --- app-template/annotate_icon.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app-template/annotate_icon.sh b/app-template/annotate_icon.sh index eb4504fe5..30a9658cc 100755 --- a/app-template/annotate_icon.sh +++ b/app-template/annotate_icon.sh @@ -1,8 +1,14 @@ #!/usr/bin/env bash +#usage: ./annotate_icon.sh beta BETA 003eaa + +# Required command line parameters FOLDER_NAME=$1 +ICON_TEXT=$2 +HEX_COLOR=$3 + DEST_FOLDER_RELATIVE=../resources/bitcoin.com/ios/icon/$FOLDER_NAME mkdir $DEST_FOLDER_RELATIVE -convert '../resources/bitcoin.com/ios/icon/icon-1024.png' -gravity center -pointsize 144 -fill '#003eaa' -draw "fill #003eaa rotate -45 rectangle -500,1035,500,1200" -draw "fill white font 'bitcoincom/fonts/ProximaNova-ExtraBold.otf' rotate -45 text 0,400 'DEBUG'" $DEST_FOLDER_RELATIVE/icon-1024.png +convert '../resources/bitcoin.com/ios/icon/icon-1024.png' -gravity center -pointsize 144 -draw "fill '#$HEX_COLOR' rotate -45 rectangle -500,1035,500,1200" -draw "fill white font 'bitcoincom/fonts/ProximaNova-ExtraBold.otf' rotate -45 text 0,400 '$ICON_TEXT'" $DEST_FOLDER_RELATIVE/icon-1024.png convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 120x120 $DEST_FOLDER_RELATIVE/icon-120.png \ No newline at end of file From 8377744ce4bf5972a5ce71a434967aaf66c32b17 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 14 Jan 2019 14:11:50 -0600 Subject: [PATCH 07/11] Script to annotate icon from branch name. --- app-template/annotate_icon.sh | 49 ++++++++++++- app-template/generate-build-resources.js | 92 ++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 app-template/generate-build-resources.js diff --git a/app-template/annotate_icon.sh b/app-template/annotate_icon.sh index 30a9658cc..b925fb93c 100755 --- a/app-template/annotate_icon.sh +++ b/app-template/annotate_icon.sh @@ -11,4 +11,51 @@ DEST_FOLDER_RELATIVE=../resources/bitcoin.com/ios/icon/$FOLDER_NAME mkdir $DEST_FOLDER_RELATIVE convert '../resources/bitcoin.com/ios/icon/icon-1024.png' -gravity center -pointsize 144 -draw "fill '#$HEX_COLOR' rotate -45 rectangle -500,1035,500,1200" -draw "fill white font 'bitcoincom/fonts/ProximaNova-ExtraBold.otf' rotate -45 text 0,400 '$ICON_TEXT'" $DEST_FOLDER_RELATIVE/icon-1024.png -convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 120x120 $DEST_FOLDER_RELATIVE/icon-120.png \ No newline at end of file + +# iPhone Notifications +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 40x40 $DEST_FOLDER_RELATIVE/icon-40.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 60x60 $DEST_FOLDER_RELATIVE/icon-60.png + +# iPhone Settings +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 29x29 $DEST_FOLDER_RELATIVE/icon-29.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 58x58 $DEST_FOLDER_RELATIVE/icon-58.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 87x87 $DEST_FOLDER_RELATIVE/icon-87.png + +# iPhone Spotlight +# 40 - already done +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 80x80 $DEST_FOLDER_RELATIVE/icon-80.png + +# iPhone App, iOS 5, 6 +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 57x57 $DEST_FOLDER_RELATIVE/icon-57.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 114x114 $DEST_FOLDER_RELATIVE/icon-114.png + +# iPhone App, iOS 7+ +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 120x120 $DEST_FOLDER_RELATIVE/icon-120.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 180x180 $DEST_FOLDER_RELATIVE/icon-180.png + +# iPad Notifications +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 20x20 $DEST_FOLDER_RELATIVE/icon-20.png +# 40 - already done + +# iPad Settings +# 29 - already done +# 58 - already done + +# iPad Spotlight, iOS 7+ +# 40 - already done +# 80 - already done + +# iPad Spotlight, iOS 5, 6 +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 50x50 $DEST_FOLDER_RELATIVE/icon-50.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 100x100 $DEST_FOLDER_RELATIVE/icon-100.png + +# iPad App, iOS 5, 6 +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 72x72 $DEST_FOLDER_RELATIVE/icon-72.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 144x144 $DEST_FOLDER_RELATIVE/icon-144.png + +# iPad App, iOS 7+ +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 76x76 $DEST_FOLDER_RELATIVE/icon-76.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 152x152 $DEST_FOLDER_RELATIVE/icon-152.png + +# iPad Pro App +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 167x167 $DEST_FOLDER_RELATIVE/icon-167.png \ No newline at end of file diff --git a/app-template/generate-build-resources.js b/app-template/generate-build-resources.js new file mode 100644 index 000000000..70b30cff9 --- /dev/null +++ b/app-template/generate-build-resources.js @@ -0,0 +1,92 @@ +#!/usr/bin/env node + +var shell = require('shelljs'); + +console.log('Annotating icon...'); +var branchExec = shell.exec('git rev-parse --abbrev-ref HEAD'); + +if (branchExec.code !== 0) { + console.error('Failed to get branch name, exit code: ' + branchExec.code); + return; +} +var branch = branchExec.output.trim() +console.log('Branch: "' + branch + '"'); +var branchParts = branch.split('/'); + +var branchType = 'unknown'; +var branchNumber = ''; + +switch (branchParts.length) { + case 2: + if (branchParts[1] === 'dev') { + branchType = 'dev' + } + break; + case 3: + switch (branchParts[1]) { + case 'hotfix': + branchType = 'hotfix'; + branchNumber = branchParts[2]; + break; + case 'sprint': + branchType = 'sprint'; + branchNumber = branchParts[2]; + break; + case 'task': + branchType = 'task'; + branchNumber = branchParts[2]; + break; + default: + // nop + } + break; + default: + // nop +} + +var buildVariant = ''; +var color = ''; +var iconText = ''; + + +// Normal flow of colour +// Red -> Orange -> Green as build gets more solid +// task -> sprint -> dev +// Out of band fixes (hotfixes) are an out of band colour: blue + +// Treat unidentified branches as release. +switch (branchType) { + case 'dev': + buildVariant = 'dev'; + color = '004c03'; + iconText = 'DEV'; + break; + case 'hotfix': + buildVariant = 'hotfix'; + color = '003eaa'; + iconText = 'H' + branchNumber; + break; + case 'sprint': + buildVariant = 'sprint' + branchNumber; + color = 'c94900' + iconText = 'S' + branchNumber; + break; + case 'task': + buildVariant = 'task' + branchNumber; + color = 'a0001f' + iconText = branchNumber; + break; + default: + // Treat as release +} + +var annotateCommandLine = './annotate_icon.sh ' + buildVariant + ' ' + iconText + ' ' + color; +console.log('Annotate command line: "' + annotateCommandLine + '"'); +var annotateExec = shell.exec(annotateCommandLine); + +if (annotateExec.code !== 0) { + console.log('Failed to annotate the icon, exit code: ' + annotateExec.code); + return; +} + +console.log('Annotating icon complete.'); \ No newline at end of file From c100a6fb5e646929e7b1c826a9e68f89399e73f5 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 14 Jan 2019 16:50:38 -0600 Subject: [PATCH 08/11] Creating icon from master in app-template folder. --- app-template/annotate_icon.sh | 14 ++++++++++---- app-template/generate-build-resources.js | 10 +++++++++- app-template/resources/ios/icon/icon-1024.png | Bin 0 -> 23536 bytes 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 app-template/resources/ios/icon/icon-1024.png diff --git a/app-template/annotate_icon.sh b/app-template/annotate_icon.sh index b925fb93c..df1ae8161 100755 --- a/app-template/annotate_icon.sh +++ b/app-template/annotate_icon.sh @@ -4,13 +4,19 @@ # Required command line parameters FOLDER_NAME=$1 -ICON_TEXT=$2 -HEX_COLOR=$3 - DEST_FOLDER_RELATIVE=../resources/bitcoin.com/ios/icon/$FOLDER_NAME +DEST_ICON_MASTER=$DEST_FOLDER_RELATIVE/icon-1024.png +SOURCE_ICON='resources/ios/icon/icon-1024.png' mkdir $DEST_FOLDER_RELATIVE -convert '../resources/bitcoin.com/ios/icon/icon-1024.png' -gravity center -pointsize 144 -draw "fill '#$HEX_COLOR' rotate -45 rectangle -500,1035,500,1200" -draw "fill white font 'bitcoincom/fonts/ProximaNova-ExtraBold.otf' rotate -45 text 0,400 '$ICON_TEXT'" $DEST_FOLDER_RELATIVE/icon-1024.png + +if [ -z "$3" ]; then + cp $SOURCE_ICON $DEST_ICON_MASTER +else + ICON_TEXT=$2 + HEX_COLOR=$3 + convert $SOURCE_ICON -gravity center -pointsize 144 -draw "fill '#$HEX_COLOR' rotate -45 rectangle -500,1035,500,1200" -draw "fill white font 'bitcoincom/fonts/ProximaNova-ExtraBold.otf' rotate -45 text 0,400 '$ICON_TEXT'" $DEST_ICON_MASTER +fi # iPhone Notifications convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 40x40 $DEST_FOLDER_RELATIVE/icon-40.png diff --git a/app-template/generate-build-resources.js b/app-template/generate-build-resources.js index 70b30cff9..a3099962a 100644 --- a/app-template/generate-build-resources.js +++ b/app-template/generate-build-resources.js @@ -3,7 +3,15 @@ var shell = require('shelljs'); console.log('Annotating icon...'); -var branchExec = shell.exec('git rev-parse --abbrev-ref HEAD'); +console.log('Checking installation of ImageMagick...'); +var convertExec = shell.exec('convert -version', { silent: true }); +if (convertExec.code !== 0) { + +} else { + console.log('ImageMagick found.'); +} + +var branchExec = shell.exec('git rev-parse --abbrev-ref HEAD', { silent: true }); if (branchExec.code !== 0) { console.error('Failed to get branch name, exit code: ' + branchExec.code); diff --git a/app-template/resources/ios/icon/icon-1024.png b/app-template/resources/ios/icon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x@Qz<7yG`@i5vw4iCp}%x1E13_y20iYTtSth;}~sfXLnA)-P960wS-{(?u>D(RYdq zn%hhPwSFJ$VLOxajm2YfYs=Kt`&LKEDu`$4ZEqcRoT`>29d0OFmfp&Eg%EA}XUqS+ z|Nn<~FADZQ_741iwtcPbNY$xN>WRc?O=Gd})cR!4NCTDo zM2}mKmIutJx!3_Q^2Bi<+fRVU9CIcTaO1*70Dv#yN=OP>hiybK*fJV)Sk-LX60Y>C z8p{jgsaykCG~p~+tDz%#YaFA3r*h|1Npv}>){IAhZ+1+X##%cslWAlwbs86!oQCCf zVs3&|r8OZsJq`gGXZ5T4Fs#@FEiA?(zCli;e;1j$dJe)hn!IwFCdV_CrKPj}NVkyk zgN_F(t>!o>=TJnOXhyFkq|Ekpqp*>ZUDBqBI*!2$9wiHy#9FG#H)X`ubW7%1PFn)G z$OhAC?^SwjKWO+b9NqN@3oA%uOovpyb17YCji3e*Wc;vH;5!mMI8uy5rw7=2*$ft+ zWyV-CJ@h8Z2HZHuNb38Lat&kRAokQ|cWL~E_5QG`UBJ0g6VK9XjA^PWbA4|B?nC3& zKxv!G9?YZ_v=HnZeDz)-F%s*+V>cVv{Rcx6`?7S)Ysl?*a3!av*6RRZyOdgjX%$v6zy0C Date: Fri, 18 Jan 2019 17:34:52 -0600 Subject: [PATCH 09/11] Creating some different icon sizes. --- app-template/annotate_icon.sh | 16 ++++++++++++++-- app-template/generate-build-resources.js | 5 ++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app-template/annotate_icon.sh b/app-template/annotate_icon.sh index df1ae8161..49463a98e 100755 --- a/app-template/annotate_icon.sh +++ b/app-template/annotate_icon.sh @@ -4,7 +4,8 @@ # Required command line parameters FOLDER_NAME=$1 -DEST_FOLDER_RELATIVE=../resources/bitcoin.com/ios/icon/$FOLDER_NAME +#DEST_FOLDER_RELATIVE=../resources/bitcoin.com/ios/icon/$FOLDER_NAME +DEST_FOLDER_RELATIVE=../resources/bitcoin.com/ios/icon DEST_ICON_MASTER=$DEST_FOLDER_RELATIVE/icon-1024.png SOURCE_ICON='resources/ios/icon/icon-1024.png' @@ -64,4 +65,15 @@ convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 76x76 $DEST_FOLDER_RELATIVE/ convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 152x152 $DEST_FOLDER_RELATIVE/icon-152.png # iPad Pro App -convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 167x167 $DEST_FOLDER_RELATIVE/icon-167.png \ No newline at end of file +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 167x167 $DEST_FOLDER_RELATIVE/icon-167.png + +# Apple Watch Notification Centre +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 48x48 $DEST_FOLDER_RELATIVE/icon-48.png +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 55x55 $DEST_FOLDER_RELATIVE/icon-55.png + +# Apple Watch Companion Settings Notification Centre +# 58 - already done +# 87 - already done + +# Apple Watch +convert $DEST_FOLDER_RELATIVE/icon-1024.png -resize 88x88 $DEST_FOLDER_RELATIVE/icon-88.png \ No newline at end of file diff --git a/app-template/generate-build-resources.js b/app-template/generate-build-resources.js index a3099962a..d03b85e13 100644 --- a/app-template/generate-build-resources.js +++ b/app-template/generate-build-resources.js @@ -52,11 +52,14 @@ switch (branchParts.length) { // nop } +// Override for debugging +//branchType = 'dev'; +//branchNumber = '26'; + var buildVariant = ''; var color = ''; var iconText = ''; - // Normal flow of colour // Red -> Orange -> Green as build gets more solid // task -> sprint -> dev From cc08b006b9fc8bd9a6175c8fc885c31e1123cf6e Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 18 Jan 2019 17:35:28 -0600 Subject: [PATCH 10/11] Inserting one part of a build configuration. --- .../create-ios-build-configurations.js | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 app-template/create-ios-build-configurations.js diff --git a/app-template/create-ios-build-configurations.js b/app-template/create-ios-build-configurations.js new file mode 100644 index 000000000..b59d67beb --- /dev/null +++ b/app-template/create-ios-build-configurations.js @@ -0,0 +1,127 @@ +'use strict'; + +const assert = require('assert'); +const fs = require('fs'); + +console.log('******'); + +fs.readFile(__dirname + '/../platforms/ios/Bitcoin.com\ Wallet.xcodeproj/project.pbxproj', function onReadFile(err, data) { + if (err) { + throw err; + } + //console.log(data.toString()); + var contents = data.toString(); + //console.log('File was read.'); + getDebugConfigurations(contents); +}); + + +function addConfiguration(contents) { + +} + +function getBuildConfig(contents, idAndName) { + const idIndex = contents.indexOf(idAndName); + assert(idIndex); + + const buildConfigOpeningBracketIndex = contents.indexOf('{', idIndex); + const buildSettingsClosingBracketIndex = contents.indexOf('}', buildConfigOpeningBracketIndex + 1); + const buildConfigClosingBracketIndex = contents.indexOf('}', buildSettingsClosingBracketIndex + 1); + + const buildConfig = contents.substring( + buildConfigOpeningBracketIndex, + buildConfigClosingBracketIndex + 1 + ); + + return buildConfig; +} + +function insertBuildConfiguration(contents, buildConfiguration, idAndName) { + const buildConfigsEndDelimiter = '/* End XCBuildConfiguration section */'; + const buildConfigEndIndex = contents.indexOf(buildConfigsEndDelimiter); + assert(buildConfigEndIndex >= 0); + + const newConfig = ' ' + idAndName + ' = ' + buildConfiguration + '\n' + buildConfigsEndDelimiter; + const newContents = contents.replace(buildConfigsEndDelimiter, newConfig); + + fs.writeFile(__dirname + '/../platforms/ios/Bitcoin.com\ Wallet.xcodeproj/project2.pbxproj', newContents, function onWriteFile(err) { + if(err) { + return console.log(err); + } + + console.log('project2.pbxproj was written'); + }); +} + +function renamedBuildConfig(buildConfig, newName) { + return buildConfig.replace('name = Debug', 'name = ' + newName); +} + +function getDebugConfiguration(contents, configContents, start, newName, newId) { + + const buildConfigId = getDebugConfigurationId(contents, configContents, start); + assert(buildConfigId); + const buildConfig = getBuildConfig(contents, buildConfigId); + assert(buildConfig) + + const renamed = renamedBuildConfig(buildConfig, newName); + assert(renamed); + + insertBuildConfiguration(contents, renamed, 'AAAAAAAAAAAAAAAAAAAAAAA1 /* ' + newName + ' */') + + return renamed; +} + +function getDebugConfigurationId(contents, configContents, start) { + //console.log('getDebugConfiguration() starting at: ' + start); + const subContents = configContents.substring(start); + //console.log('subContents: "' + subContents.substring(0, 200) + '"'); + + //const buildConfigsRegex = /[\s\S]+buildConfigurations = \(\s*([^\)]+)/; + const buildConfigsRegex = /.+buildConfigurations = \(\s*([^\)]+)/; + const buildConfigsExec = buildConfigsRegex.exec(subContents); + assert(buildConfigsExec.length === 2); + + const buildConfigsText = buildConfigsExec[1]; + //console.log('buildConfigsText: "' + buildConfigsText + '"'); + + const buildConfigLines = buildConfigsText.split(','); + let debugIdAndName = ''; + buildConfigLines.forEach(function onLine(line) { + if (line.indexOf(' Debug ') >= 0) { + debugIdAndName = line.trim(); + } + }); + + assert(debugIdAndName); + console.log('Debug build config ID:', debugIdAndName); + + //const PBXNativeTargetExistingBuildConfig = getBuildConfig(contents, PBXNativeTargetDebugIdAndName); + //console.log('PBXNativeTargetExistingBuildConfig:', PBXNativeTargetExistingBuildConfig); + return debugIdAndName; +} + + +function getDebugConfigurations(contents) { + + + //buildConfigurations = ( + // 1D6058940D05DD3E006BFB54 /* Debug */, + // DAD7F4DA21EEE6DC00135531 /* Task */, + // 1D6058950D05DD3E006BFB54 /* Release */, + //); + const newName = 'Dev'; + const PBXNativeTargetId = 'AAAAAAAAAAAAAAAAAAAAAAA1'; + const PBXProjectId = 'AAAAAAAAAAAAAAAAAAAAAAA2'; + + const configListIndex = contents.indexOf('/* Begin XCConfigurationList section */'); + const configContents = contents.substring(configListIndex); + + const PBXNativeTargetBuildConfigsIndex = configContents.indexOf('/* Build configuration list for PBXNativeTarget'); + const PBXProjectBuildConfigsIndex = configContents.indexOf('/* Build configuration list for PBXProject'); + + const PBXNativeTargetBuildConfig = getDebugConfiguration(contents, configContents, PBXNativeTargetBuildConfigsIndex, newName, PBXNativeTargetId); + //const PBXProjectBuildConfig = getDebugConfiguration(contents, configContents, PBXProjectBuildConfigsIndex, newName, PBXProjectId); + + +} \ No newline at end of file From 1e843953e971a9da7e0c0441dec279414e550620 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 18 Jan 2019 22:59:22 -0600 Subject: [PATCH 11/11] XCode now successfully loads project after programmatically adding a build configuration. --- .../create-ios-build-configurations.js | 59 +++++++++++++++---- 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/app-template/create-ios-build-configurations.js b/app-template/create-ios-build-configurations.js index b59d67beb..f685eece8 100644 --- a/app-template/create-ios-build-configurations.js +++ b/app-template/create-ios-build-configurations.js @@ -25,12 +25,12 @@ function getBuildConfig(contents, idAndName) { assert(idIndex); const buildConfigOpeningBracketIndex = contents.indexOf('{', idIndex); - const buildSettingsClosingBracketIndex = contents.indexOf('}', buildConfigOpeningBracketIndex + 1); - const buildConfigClosingBracketIndex = contents.indexOf('}', buildSettingsClosingBracketIndex + 1); + const buildSettingsClosingBracketIndex = contents.indexOf('};', buildConfigOpeningBracketIndex + 1); + const buildConfigClosingBracketIndex = contents.indexOf('};', buildSettingsClosingBracketIndex + 1); const buildConfig = contents.substring( buildConfigOpeningBracketIndex, - buildConfigClosingBracketIndex + 1 + buildConfigClosingBracketIndex + 2 // To include trailing semicolon ); return buildConfig; @@ -44,6 +44,7 @@ function insertBuildConfiguration(contents, buildConfiguration, idAndName) { const newConfig = ' ' + idAndName + ' = ' + buildConfiguration + '\n' + buildConfigsEndDelimiter; const newContents = contents.replace(buildConfigsEndDelimiter, newConfig); + /* fs.writeFile(__dirname + '/../platforms/ios/Bitcoin.com\ Wallet.xcodeproj/project2.pbxproj', newContents, function onWriteFile(err) { if(err) { return console.log(err); @@ -51,13 +52,22 @@ function insertBuildConfiguration(contents, buildConfiguration, idAndName) { console.log('project2.pbxproj was written'); }); + */ + + try { + fs.writeFileSync(__dirname + '/../platforms/ios/Bitcoin.com\ Wallet.xcodeproj/project2.pbxproj', newContents); + } catch (e) { + console.log(e); + return; + } + return newContents; } function renamedBuildConfig(buildConfig, newName) { return buildConfig.replace('name = Debug', 'name = ' + newName); } -function getDebugConfiguration(contents, configContents, start, newName, newId) { +function getDebugConfiguration(contents, configContents, start, newName) { const buildConfigId = getDebugConfigurationId(contents, configContents, start); assert(buildConfigId); @@ -67,8 +77,6 @@ function getDebugConfiguration(contents, configContents, start, newName, newId) const renamed = renamedBuildConfig(buildConfig, newName); assert(renamed); - insertBuildConfiguration(contents, renamed, 'AAAAAAAAAAAAAAAAAAAAAAA1 /* ' + newName + ' */') - return renamed; } @@ -110,18 +118,47 @@ function getDebugConfigurations(contents) { // DAD7F4DA21EEE6DC00135531 /* Task */, // 1D6058950D05DD3E006BFB54 /* Release */, //); + + const PBXNativeTargetConfigListBeginDelimiter = '/* Build configuration list for PBXNativeTarget'; + const PBXProjectConfigListBeginDelimiter = '/* Build configuration list for PBXProject'; + const XCConfigurationListBeginDelimiter = '/* Begin XCConfigurationList section */'; + const newName = 'Dev'; const PBXNativeTargetId = 'AAAAAAAAAAAAAAAAAAAAAAA1'; const PBXProjectId = 'AAAAAAAAAAAAAAAAAAAAAAA2'; + const PBXNativeTargetIdAndName = PBXNativeTargetId + ' /* ' + newName + ' */'; + const PBXProjectIdAndName = PBXProjectId + ' /* ' + newName + ' */'; - const configListIndex = contents.indexOf('/* Begin XCConfigurationList section */'); + const configListIndex = contents.indexOf(XCConfigurationListBeginDelimiter); const configContents = contents.substring(configListIndex); - const PBXNativeTargetBuildConfigsIndex = configContents.indexOf('/* Build configuration list for PBXNativeTarget'); - const PBXProjectBuildConfigsIndex = configContents.indexOf('/* Build configuration list for PBXProject'); + const PBXNativeTargetBuildConfigsIndex = configContents.indexOf(PBXNativeTargetConfigListBeginDelimiter); + const PBXProjectBuildConfigsIndex = configContents.indexOf(PBXProjectConfigListBeginDelimiter); - const PBXNativeTargetBuildConfig = getDebugConfiguration(contents, configContents, PBXNativeTargetBuildConfigsIndex, newName, PBXNativeTargetId); - //const PBXProjectBuildConfig = getDebugConfiguration(contents, configContents, PBXProjectBuildConfigsIndex, newName, PBXProjectId); + const PBXNativeTargetBuildConfig = getDebugConfiguration(contents, configContents, PBXNativeTargetBuildConfigsIndex, newName); + const PBXProjectBuildConfig = getDebugConfiguration(contents, configContents, PBXProjectBuildConfigsIndex, newName); + let newContents = insertBuildConfiguration(contents, PBXNativeTargetBuildConfig, PBXNativeTargetIdAndName); + newContents = insertBuildConfiguration(newContents, PBXProjectBuildConfig, PBXProjectIdAndName); + + const newConfigListIndex = newContents.indexOf(XCConfigurationListBeginDelimiter); + + const newPBXNativeTargetBuildConfigsIndex = newContents.indexOf(PBXNativeTargetConfigListBeginDelimiter, newConfigListIndex); + let configListEndIndex = newContents.indexOf(')', newPBXNativeTargetBuildConfigsIndex); + assert(configListEndIndex >= 0); + newContents = newContents.slice(0, configListEndIndex) + PBXNativeTargetIdAndName + ',\n ' + newContents.slice(configListEndIndex); + + const newPBXProjectBuildConfigsIndex = newContents.indexOf(PBXProjectConfigListBeginDelimiter, newConfigListIndex); + configListEndIndex = newContents.indexOf(')', newPBXProjectBuildConfigsIndex); + assert(configListEndIndex >= 0); + newContents = newContents.slice(0, configListEndIndex) + PBXProjectIdAndName + ',\n ' + newContents.slice(configListEndIndex); + + try { + fs.writeFileSync(__dirname + '/../platforms/ios/Bitcoin.com\ Wallet.xcodeproj/project2.pbxproj', newContents); + } catch (e) { + console.log(e); + return; + } + } \ No newline at end of file