Skip to content

Commit

Permalink
Merge branch 'release/2.0.0-beta01'
Browse files Browse the repository at this point in the history
  • Loading branch information
shprink committed Jan 8, 2016
2 parents 8f29135 + d60f974 commit 8197313
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 54 deletions.
32 changes: 15 additions & 17 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# 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
```


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)

## 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

Expand Down Expand Up @@ -43,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```
Expand Down Expand Up @@ -87,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:
Expand All @@ -105,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/*" />
Expand All @@ -123,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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<a name="2.0.0-beta01"></a>
### 2.0.0-beta01 (2016-01-08)

* Doc Update
* Force crosswalk to generate two apks

<a name="2.0.0-alpha6"></a>
### 2.0.0-alpha6 LATEST ALPHA! (2016-01-07)

Expand Down
12 changes: 11 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +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. Every source code modification will build the project automatically and live reload the application.
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)
35 changes: 20 additions & 15 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.

Expand All @@ -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.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ npm run buildAndroid
npm run buildProdAndroid
npm run buildIOS
npm run buildProdIOS
npm run buildAll
npm run buildProdAll
```

## Support
Expand Down
8 changes: 5 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand Down
9 changes: 1 addition & 8 deletions ionic.project
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{
"name": "wordpress-hybrid-client",
"app_id": "",
"browsers": [
{
"platform": "android",
"browser": "crosswalk",
"version": "12.41.296.5"
}
]
"app_id": ""
}
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -114,7 +112,8 @@
"locator": "https://github.com/Telerik-Verified-Plugins/NativePageTransitions#0.5.5",
"id": "com.telerik.plugins.nativepagetransitions"
},
"[email protected]"
"[email protected]",
"[email protected]"
],
"cordovaPlatforms": [
"android",
Expand Down
2 changes: 1 addition & 1 deletion release.sh.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8197313

Please sign in to comment.