Permalink
Browse files

update doc

  • Loading branch information...
shprink committed Jan 8, 2016
1 parent 153d738 commit af321abec9a4758d62537801f04983c26ccdb1f7
Showing with 43 additions and 36 deletions.
  1. +12 −16 BUILD.md
  2. +5 −1 DEVELOPMENT.md
  3. +20 −15 INSTALLATION.md
  4. +5 −3 RELEASE.md
  5. +1 −1 release.sh.dist
View
@@ -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
```
<allow-navigation href="http://example.com/*" />
@@ -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
View
@@ -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)
View
@@ -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: <https://github.com/shprink/wordpress-hybrid-client/issues/39>
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: <https://github.com/shprink/wphc-dockerbox/blob/master/Dockerfile#L13-L14>
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 <the-latest-version>
```
### Install dependencies
## Install dependencies
The installation will not install anything globally to avoid potential version conflicts.
@@ -39,25 +39,30 @@ 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 <https://wordpress.org/plugins/rest-api/> (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":
"baseUrl": "http://YourDomain/wp-json"
```
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.
View
@@ -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
View
@@ -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

0 comments on commit af321ab

Please sign in to comment.