build(cordova): Begin basing cordova build on more standard config.xml
This completes the installations of cordova-plugin-qrscanner, including required changes to config.xml. Where possible, other plugins are now included with versioning in config.xml.
This commit is contained in:
parent
34197b4ae2
commit
15836bb817
9 changed files with 103 additions and 66 deletions
|
|
@ -9,7 +9,7 @@ clean:
|
|||
|
||||
|
||||
$(WORKDIR)android $(WORKDIR)ios: config.xml
|
||||
cordova create $@ com.bitpay.*NAMENOSPACE* *NAMECASENOSPACE* || echo "Project Path Existed"
|
||||
cordova create $@ com.bitpay.*NAMENOSPACE* '*NAMECASENOSPACE*' || echo "Project Path Existed"
|
||||
cp ProjectMakefile $@/Makefile
|
||||
rm -r $@/www && ln -sF ../../public $@/www
|
||||
cp config.xml $@/config.xml
|
||||
|
|
@ -35,7 +35,7 @@ wp-init: config.xml
|
|||
cp config.xml $(WORKDIR)$@/config.xml
|
||||
make -C $(WORKDIR)$@ $(subst $(WORKDIR),, $(WORKDIR)$@)
|
||||
|
||||
wp-copy:
|
||||
wp-copy:
|
||||
cp -rvf wp/Properties/* $(WORKDIR)wp/platforms/wp8/Properties/
|
||||
cp -rvf wp/MainPage.xaml $(WORKDIR)wp/platforms/wp8/
|
||||
cp -rvf wp/Package.appxmanifest $(WORKDIR)wp/platforms/wp8/
|
||||
|
|
|
|||
|
|
@ -1,52 +1,24 @@
|
|||
.PHONY:plugins ios-platform android-platform wp8-platform
|
||||
|
||||
plugins:
|
||||
cordova plugin add cordova-plugin-globalization
|
||||
cordova plugin add cordova.plugins.diagnostic
|
||||
cordova plugin add cordova-plugin-splashscreen
|
||||
cordova plugin add cordova-plugin-statusbar
|
||||
cordova plugin add https://github.com/cmgustavo/Custom-URL-scheme.git --variable URL_SCHEME=bitcoin --variable SECOND_URL_SCHEME=*NAMENOSPACE*
|
||||
cordova plugin add cordova-plugin-inappbrowser
|
||||
cordova plugin add cordova-plugin-x-toast && cordova prepare
|
||||
cordova plugin add https://github.com/VersoSolutions/CordovaClipboard
|
||||
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare
|
||||
cordova plugin add cordova-plugin-spinner-dialog
|
||||
cordova plugin add cordova-plugin-dialogs
|
||||
cordova plugin add cordova-plugin-network-information
|
||||
cordova plugin add cordova-plugin-console
|
||||
cordova plugin add cordova-plugin-uniquedeviceid
|
||||
cordova plugin add cordova-plugin-file
|
||||
cordova plugin add cordova-plugin-touch-id
|
||||
cordova prepare
|
||||
cordova plugin add cordova-plugin-transport-security
|
||||
cordova plugin add cordova-ios-requires-fullscreen
|
||||
cordova plugin add cordova-plugin-disable-bitcode
|
||||
rm -rf platforms/android/res/values-es
|
||||
cordova plugin add cordova-plugin-android-fingerprint-auth
|
||||
cordova plugin add cordova-plugin-screen-orientation
|
||||
cordova plugin add ionic-plugin-keyboard
|
||||
cordova plugin add cordova-plugin-whitelist
|
||||
cordova plugin add https://github.com/driftyco/cordova-plugin-wkwebview-engine.git --save
|
||||
|
||||
|
||||
|
||||
ios-platform android-platform wp8-platform:
|
||||
cordova platforms add $(subst -platform,,$@) || echo "Platform already added"
|
||||
|
||||
ios: ios-platform plugins
|
||||
cordova plugin add https://github.com/tjwoon/csZBar.git
|
||||
cordova plugin add phonegap-plugin-push@1.5.3
|
||||
echo
|
||||
|
||||
android: android-platform plugins
|
||||
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
|
||||
cordova plugin add phonegap-plugin-push@1.2.3
|
||||
echo
|
||||
|
||||
wp: wp8-platform plugins
|
||||
cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner
|
||||
echo
|
||||
|
||||
build-ios build-android build-wp8:
|
||||
cordova build $(subst build-,,$@)
|
||||
|
||||
run:
|
||||
cordova run --device
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,63 @@
|
|||
<preference name="windows-target-version" value="8.1"/>
|
||||
<preference name="Orientation" value="default" />
|
||||
|
||||
<!-- Supported Platforms -->
|
||||
<!-- <engine name="ios" spec="~4.2.1" />
|
||||
<engine name="android" spec="~5.2.2" />
|
||||
<engine name="wp8" spec="~3.8.2" /> -->
|
||||
|
||||
<!-- Plugins -->
|
||||
<plugin name="cordova-plugin-globalization" spec="~1.0.4" />
|
||||
<plugin name="cordova.plugins.diagnostic" spec="~3.2.1" />
|
||||
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
|
||||
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
|
||||
<plugin name="cordova-plugin-inappbrowser" spec="~1.5.0" />
|
||||
<plugin name="cordova-plugin-x-toast" spec="~2.5.2" />
|
||||
<plugin name="com.verso.cordova.clipboard" spec="https://github.com/VersoSolutions/CordovaClipboard" />
|
||||
<plugin name="cordova-plugin-x-socialsharing" spec="https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" />
|
||||
<plugin name="cordova-plugin-spinner-dialog" spec="~1.3.1" />
|
||||
<plugin name="cordova-plugin-dialogs" spec="~1.3.0" />
|
||||
<plugin name="cordova-plugin-network-information" spec="~1.3.0" />
|
||||
<plugin name="cordova-plugin-console" spec="~1.0.4" />
|
||||
<plugin name="cordova-plugin-uniquedeviceid" spec="~1.3.2" />
|
||||
<plugin name="cordova-plugin-file" spec="~4.3.0" />
|
||||
<plugin name="cordova-plugin-touch-id" spec="~3.2.0" />
|
||||
<plugin name="cordova-plugin-transport-security" spec="~0.1.2" />
|
||||
<plugin name="cordova-ios-requires-fullscreen" spec="~0.0.2" />
|
||||
<plugin name="cordova-plugin-disable-bitcode" spec="~1.3.2" />
|
||||
<plugin name="cordova-plugin-android-fingerprint-auth" spec="~0.2.0" />
|
||||
<plugin name="cordova-plugin-screen-orientation" spec="~1.4.2" />
|
||||
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
|
||||
<plugin name="cordova-plugin-whitelist" spec="~1.3.0" />
|
||||
<plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" />
|
||||
<plugin name="cordova-plugin-qrscanner" spec="~2.3.3" />
|
||||
<platform name="wp8">
|
||||
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
|
||||
</platform>
|
||||
<platform name="android">
|
||||
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
|
||||
<plugin name="phonegap-plugin-push" spec="~1.8.2" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<plugin name="cordova-plugin-cszbar" spec="https://github.com/tjwoon/csZBar.git" />
|
||||
<plugin name="phonegap-plugin-push" spec="~1.5.3" />
|
||||
</platform>
|
||||
|
||||
<!-- Hooks -->
|
||||
|
||||
<platform name="android">
|
||||
<hook type="after_run" src="scripts/afterRun.js" />
|
||||
</platform>
|
||||
|
||||
<platform name="ios">
|
||||
<hook type="before_build" src="../../node_modules/cordova-plugin-qrscanner/scripts/swift-support.js" />
|
||||
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
|
||||
<string>The camera is used to read QR codes.</string>
|
||||
</config-file>
|
||||
</platform>
|
||||
|
||||
<!-- Assets -->
|
||||
|
||||
<platform name="ios">
|
||||
<!-- iOS 8.0+ -->
|
||||
<!-- iPad Pro -->
|
||||
|
|
|
|||
|
|
@ -86,12 +86,18 @@
|
|||
"xcode": "^0.8.2"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "bower install && npm i fs-extra && cd app-template && node apply.js",
|
||||
"postinstall": "npm run build",
|
||||
"preinstall": "bower install && npm i fs-extra",
|
||||
"build": "grunt",
|
||||
"start": "node app.js",
|
||||
"apply:copay": "cd app-template && node apply.js",
|
||||
"apply:bitpay-wallet": "cd app-template && node apply.js bitpay-wallet",
|
||||
"start": "npm run build && node app.js",
|
||||
"watch": "grunt watch",
|
||||
"test": "./node_modules/.bin/grunt test-coveralls",
|
||||
"clean": "git clean -dfx"
|
||||
"clean": "git clean -dfx",
|
||||
"start:ios": "npm run build && cd cordova && trash project-ios && make ios && open project-ios/platforms/ios/BitPay\\ Wallet.xcodeproj",
|
||||
"start:android": "npm run build && cd cordova && trash project-android && make android"
|
||||
},
|
||||
"devDependencies": {}
|
||||
"devDependencies": {
|
||||
"trash-cli": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue