Skip to main content

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

cd mysite

composer install

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.

Want to work with us?

Want to start something?

Fantastic! We'd love to hear from you, whethere it's a pitch, an idea or just saying hello!

Feel free to get in touch.

 

Drop us an email?

info@citywebconsultants.co.uk

 

Or give us a call?

+44 (0) 191 906 7746

 

Playing hard to get? We'll contact you