1. Install Wordpress templates

CeNews compatiable with most of Wordpress template (99%) so you can integrate the app with your existing template.

2. Install Wordpress plugins

  • Better REST API Featured Images - Download
  • JWT Authentication for WP REST API - Download

3. Setting Wordpress

JWT Authentication

Most of the shared hosting has disabled the HTTP Authorization Headerby default.

To enable this option you’ll need to edit your .htaccess file adding the follow

RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

The JWT needs a secret key to sign the token this secret key must be unique and never revealed.

To add the secret key edit your wp-config.php file and add a new constant called JWTAUTHSECRET_KEY

define('JWT_AUTH_SECRET_KEY', 'your-top-secret-key');

You can use a string from here https://api.wordpress.org/secret-key/1.1/salt/

Refere more detail: https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/

Enable Worpdress setting: Permalink URL setting: Go to Common Setting, change the URL to Post name, this is required for the setting otherwise some images could not loading.

Membership registration

This setting is allow every one can register on your mobile app, go to Setting and enable the option Anyone can register. member

3. Config the Mobile App

Open App/common/Config.js and change the URL to your website URL

Video installing guide: https://www.youtube.com/playlist?list=PLcF-HiQy-jOKXlP4nBjxBJjP-Q3-yOnAs

4. Running on Expo app Client

  • Beside running the demo right on the Simulator, it's possible to run it right on your mobile phone but it should have the same wifi network (or using USB cable)
  • Dowload the Expo Client app: download for Android from the Play Store or for iOS from the App Store
  • Running by openning the Expo Client, select the Project tab menu, then you can see the list of RECENTLY IN DEVELOPMENT where content the URL point to your local URL (make sure you are login the same account on Expo Cli and Expo Client)