In this tutorial series, we well go through the process of creating a cross-platform mobile app using a headless Drupal 8 backend with a REST API. The app will have native UI and navigation, ie, on iOS it will look and feel like a native iOS app, same for android. Various steps use *nix or OSX command-line instructions.
First we will setup the backend Drupal 8 site.
Go to a directory where you want to install your new Drupal site, we will call it 'mysite'.
git clone --branch 8.3.x https://git.drupal.org/project/drupal.git mysite
You may only want to build/deploy this app on mobile devices, however, it’s far quicker/simpler to test using your browser so it’s recommended to setup the app so that it can be run from the browser. For web-apps (whether for testing or deploying), there are two ways to deploy this setup, one is to host app code within the Drupal root or outside the root (even on a different server).
Update hosts file
sudo nano /etc/hosts
Add the following line:
127.0.0.1 mysite.local app.mysite.local
You will need a virtual host setup for this new Drupal site at the domain http://mysite.local (Server specific installation)
Go to http://mysite.local and go through the usual standard Drupal installation.