From 2f3130c01561159441e42b583691e8e8b8443f96 Mon Sep 17 00:00:00 2001 From: Julien Renaux Date: Thu, 7 Jan 2016 22:13:55 -0600 Subject: [PATCH 1/5] update doc --- DEVELOPMENT.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 816c8a4ab..d5667e819 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -10,4 +10,10 @@ live reload in memory (no files are dumped in www folder) npm run devserver ``` -Open http://localhost:8080/webpack-dev-server/ and check if everything run as expected. Every source code modification will build the project automatically and live reload the application. +Open http://localhost:8080/webpack-dev-server/ and check if everything run as expected. + +You should see this: + +![image](https://cloud.githubusercontent.com/assets/1388706/12190201/75324ec8-b58b-11e5-871c-d672a0666959.png) + +If you do not please reach us on [Gitter](https://gitter.im/shprink/wordpress-hybrid-client) From 153d7380ed3f35b80913a7c7996978a659d718e2 Mon Sep 17 00:00:00 2001 From: Julien Renaux Date: Thu, 7 Jan 2016 22:19:57 -0600 Subject: [PATCH 2/5] update doc --- BUILD.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index e10f1d927..37b41d815 100644 --- a/BUILD.md +++ b/BUILD.md @@ -7,7 +7,9 @@ ionic state restore ``` -All the necessary plugins will be installed as well. +All the necessary plugins will be installed as well: + +![image](https://cloud.githubusercontent.com/assets/1388706/12190311/be4cb570-b58c-11e5-859e-23d0420f06d3.png) ## Android From af321abec9a4758d62537801f04983c26ccdb1f7 Mon Sep 17 00:00:00 2001 From: shprink Date: Thu, 7 Jan 2016 23:34:08 -0600 Subject: [PATCH 3/5] update doc --- BUILD.md | 28 ++++++++++++---------------- DEVELOPMENT.md | 6 +++++- INSTALLATION.md | 35 ++++++++++++++++++++--------------- RELEASE.md | 8 +++++--- release.sh.dist | 2 +- 5 files changed, 43 insertions(+), 36 deletions(-) diff --git a/BUILD.md b/BUILD.md index 37b41d815..4d8b37f47 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,6 +1,8 @@ # Build -Install platforms, plugins and crosswalk +Do not try to run the app on device if you have not [run the app on the browser](DEVELOPMENT.md) first. + +Install platforms, plugins and crosswalk: ``` ionic state restore @@ -11,6 +13,10 @@ All the necessary plugins will be installed as well: ![image](https://cloud.githubusercontent.com/assets/1388706/12190311/be4cb570-b58c-11e5-859e-23d0420f06d3.png) +## Config.xml + +`config.xml` is setup to work by default but you will need to add the app id, app name, app description, author email and name. Make sure you do so before releasing in the stores. + ## Android ### Preriquisites @@ -45,14 +51,10 @@ sudo apt-get install ant Plug your device in if you have one (make sure your device is listed by running: ```$ adb devices```) or let Android emulator handle it. ``` -# Dump dev files within the www folder -npm run dumpdev - +# Dump dev files within the www folder and run android in debug mode npm run android ``` -NB: If you want to test the minification you could also run the prod version on debug mode by using ```npm run dumpprod``` instead of ```npm run dumpdev``` - ### Debug Open Chrome and dump this in the address bar: ```chrome://inspect/#devices``` @@ -89,14 +91,10 @@ If you have ran ```npm run installCordova``` correctly you should have a Xcode p Plug your device in if you have one or let iOS simulator handle it. ``` -# Dump dev files within the www folder -npm run dumpdev - +# Dump dev files within the www folder and run iOS in debug mode npm run iosEmulator ``` -NB: If you want to test the minification you could also run the prod version on debug mode by using ```npm run dumpprod``` instead of ```npm run dumpdev``` - ### Build and run on device dev version (Non minified and debug ON) For details about various requirements to deploy to a device, refer to the Cordova article: [Getting Started with iOS](http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_ios_index.md.html). Briefly, you need to do the following before deploying: @@ -107,15 +105,13 @@ For details about various requirements to deploy to a device, refer to the Cordo 1. Verify that the Code Signing section's Code Signing Identity within the project settings is set to your provisioning profile name. ``` -# Dump dev files within the www folder -npm run dumpdev - +# Dump dev files within the www folder and run iOS in debug mode npm run ios ``` ### URL whitelist -Add you webservice URL to the config.xml file +Add you webservice URL to the `config.xml` file ``` @@ -125,7 +121,7 @@ More details: https://github.com/apache/cordova-plugin-whitelist ### Debug -To have logs dunp in the terminal you can use ```--consolelogs``` options +To have logs dump in the terminal you can use ```--consolelogs``` options ``` npm run ios -- --consolelogs diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index d5667e819..e226f06dc 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -10,10 +10,14 @@ live reload in memory (no files are dumped in www folder) npm run devserver ``` -Open http://localhost:8080/webpack-dev-server/ and check if everything run as expected. +Open http://localhost:8080/webpack-dev-server/ in Chrome (the only browser supported) and check if everything run as expected. You should see this: ![image](https://cloud.githubusercontent.com/assets/1388706/12190201/75324ec8-b58b-11e5-871c-d672a0666959.png) If you do not please reach us on [Gitter](https://gitter.im/shprink/wordpress-hybrid-client) + +--- + +Now that the app is working on your browser we can start [building on iOS & Android!](BUILD.md) diff --git a/INSTALLATION.md b/INSTALLATION.md index 8f6a0e54b..a158989eb 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -1,16 +1,16 @@ -## Installation +# Installation -This installation works on both OSX and Linux. Windows is not supported yet, if you want to help with that let us know: +This installation works on both OSX and Linux. Windows is not supported yet, if you want to help with that let us know: [https://github.com/shprink/wordpress-hybrid-client/issues/39](https://github.com/shprink/wordpress-hybrid-client/issues/39) -### Preriquisites +## Preriquisites -* NodeJS (recommended: 4.x), please do not use npm 5.x for now -* NPM (recommended: 3.3.x `sudo npm install -g npm`) -* Ionic CLI `sudo npm install -g ionic` +- NodeJS (recommended: 4.x), please do not use npm 5.x for now +- NPM (recommended: 3.3.x `sudo npm install -g npm`) +- Ionic CLI `sudo npm install -g ionic` -If you are running linux you might need to install all of the following dependencies: +If you are running linux you might need to install all of the following dependencies: [https://github.com/shprink/wphc-dockerbox/blob/master/Dockerfile#L13-L14](https://github.com/shprink/wphc-dockerbox/blob/master/Dockerfile#L13-L14) -### Clone repository +## Clone repository ``` $ git clone https://github.com/shprink/wordpress-hybrid-client.git @@ -27,7 +27,7 @@ etc. $ git checkout ``` -### Install dependencies +## Install dependencies The installation will not install anything globally to avoid potential version conflicts. @@ -39,21 +39,20 @@ npm install This could takes several minutes. During the installation you might have the following error on OSX: +- `ld: library not found for -lgcc_s.10.5`: Installing XCode 7 will solve the problem -* `ld: library not found for -lgcc_s.10.5`: Installing XCode 7 will solve the problem - -### Config files +## Config files ``` # Copy local config npm run installWPHC ``` -Your personal config files live now in the `config` folder. You can modify all of them except `config.default.cson` which contains the default config that can be overwritten using `config.dev.cson` and `config.prod.cson` +Your personal config files live now in the `config` folder. You can modify all of them except `config.default.cson` which contains the default config that can be overwritten using `config/config.cson` -### Installing the Web service +## Installing the Web service -Install this plugin (v2.x) to your WordPress website then add the address to the `config.dev.cson` and `config.prod.cson` files: +Install this plugin [https://wordpress.org/plugins/rest-api/](https://wordpress.org/plugins/rest-api/) (v2.x) to your WordPress website then add the address to the `config/config.cson`: ``` "api": @@ -61,3 +60,9 @@ Install this plugin (v2.x) to your Wor ``` Now your Webservice is ready to be queried. + +> If you do not have your WP setup yet, no problem `http://dev.julienrenaux.fr/wp-json` is set by default for you to try features. Change it when you are ready. + +--- + +Now you can either [configure](CONFIGURATION.md) your app or [start running the app](DEVELOPMENT.md) on the browser with default parameters. diff --git a/RELEASE.md b/RELEASE.md index 9e4927a7e..7a60ea223 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,6 @@ # Release -Male sure you have ios and/or android platforms installed. If you have correctly ran ```npm run installCordova``` it should be fine otherwise go back to [BUILD.md](BUILD.md). +Male sure you have ios and/or android platforms installed. If you are not sure go back to [BUILD.md](BUILD.md). ## Android @@ -20,9 +20,11 @@ ANDROID_KEY_PATH="/path/to/keystore/my-release-key.keystore" ANDROID_KEY_ALIAS="alias_name" ``` -### Keyboard adjustement +### Keyboard adjustment -Open ```platforms/android/AndroidManifest.xml``` and change ```android:windowSoftInputMode="adjustResize"``` into ```android:windowSoftInputMode="adjustNothing"``` it will prevent screen hiccup when searching. +Some Android versions can have a problem when the keyboard pops up (little hiccup of the app). If it the case on your app it can be prevented: + +Open ```platforms/android/AndroidManifest.xml``` and change ```android:windowSoftInputMode="adjustResize"``` into ```android:windowSoftInputMode="adjustNothing"```. ### Build PROD APKs diff --git a/release.sh.dist b/release.sh.dist index 4dfba0f56..2dd57d17a 100644 --- a/release.sh.dist +++ b/release.sh.dist @@ -13,7 +13,7 @@ read -p "Which platforms do you want to build? (android ios): " platforms platforms=${platforms:-"android ios"} # updgrade version before release -gulp cordova:release --${version} +npm run increaseVersion -- -s ${version} # package the app npm run dumpprod From 98336ed72e03350eb345bb7432f755eb1aad9957 Mon Sep 17 00:00:00 2001 From: shprink Date: Fri, 8 Jan 2016 00:18:50 -0600 Subject: [PATCH 4/5] forcing crosswalk to generate 2 apks --- README.md | 2 -- ionic.project | 9 +-------- package.json | 11 +++++------ 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index ac17a2db6..d2c6826bc 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,6 @@ npm run buildAndroid npm run buildProdAndroid npm run buildIOS npm run buildProdIOS -npm run buildAll -npm run buildProdAll ``` ## Support diff --git a/ionic.project b/ionic.project index 542a31599..77e9ad163 100644 --- a/ionic.project +++ b/ionic.project @@ -1,11 +1,4 @@ { "name": "wordpress-hybrid-client", - "app_id": "", - "browsers": [ - { - "platform": "android", - "browser": "crosswalk", - "version": "12.41.296.5" - } - ] + "app_id": "" } diff --git a/package.json b/package.json index e23c95af2..eaf12e7a4 100644 --- a/package.json +++ b/package.json @@ -15,12 +15,10 @@ "iosEmulator": "npm run dumpdev && cordova run ios", "ios": "npm run dumpdev && cordova run ios --device", "cordova": "cordova", - "buildAndroid": "cordova build android --device", - "buildProdAndroid": "cordova build android --device --release", + "buildAndroid": "BUILD_MULTIPLE_APKS=true cordova build android --device", + "buildProdAndroid": "BUILD_MULTIPLE_APKS=true cordova build android --device --release", "buildIOS": "cordova build ios --device", - "buildProdIOS": "cordova build ios --device --release", - "buildAll": "cordova build android ios --device", - "buildProdAll": "cordova build android ios --device --release" + "buildProdIOS": "cordova build ios --device --release" }, "keywords": [ "wp-api", @@ -114,7 +112,8 @@ "locator": "https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.5.5", "id": "com.telerik.plugins.nativepagetransitions" }, - "phonegap-plugin-push@1.2.3" + "phonegap-plugin-push@1.2.3", + "cordova-plugin-crosswalk-webview@1.4.0" ], "cordovaPlatforms": [ "android", From d60f974f861a0954873bd6f9d83ad8a632b935c3 Mon Sep 17 00:00:00 2001 From: shprink Date: Fri, 8 Jan 2016 00:37:31 -0600 Subject: [PATCH 5/5] bump --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 251d3773d..085a430c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ * [CONFIG] There is no more dev/prod distinction, WPHC turn debug OFF when building the prod app automatically. * [ABOUT] The About feature has been removed. You can use Pages to achieve the same purpose. + +### 2.0.0-beta01 (2016-01-08) + +* Doc Update +* Force crosswalk to generate two apks + ### 2.0.0-alpha6 LATEST ALPHA! (2016-01-07) diff --git a/package.json b/package.json index eaf12e7a4..7f6a10dc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wordpress-hybrid-client", - "version": "2.0.0-alpha6", + "version": "2.0.0-beta01", "title": "wordpress-hybrid-client", "description": "AngularJS client using Ionic Framework and based on the json-rest-api plugin: https://wordpress.org/plugins/json-rest-api/ with CORS enabled.", "main": "index.js",