dev.club — where best developers and top companies connect.

dev.club — where best developers and top companies connect.Invite only

Request invite

logo

Native mobile apps, as easy as creating a website.

Intro

Hyperview is a new hypermedia format and React Native client for developing server-driven mobile apps.

See the Hyperview website for more information about Hyperview and Hyperview XML.

Hyperview XML

Hyperview React Native Client

CircleCI

This repo contains a React Native implementation of the Hyperview Client. It can either be integrated into an existing React Native app, or used to create a self-contained RN app.

Requirements

The Hyperview client only has the following required dependencies:

More importantly, the client is designed to be incorporated into an existing React Native project, and thus has the following peer dependencies:

Hyperview Demo App

This repo contains an example XML server that serves Hyperview XML to showcase the available features. It also contains a demo Expo project that can connect to the example XML server, or any other Hyperview endpoint.

1. Install dependencies

From the demo/ directory:

yarn

Note: you only need to run this step once.

2. Run the demo server

From the demo/ directory:

yarn server

This will start an HTTP server listening on port 8085.

3. Run the app

This step depends on whether you want to run the demo app in the iOS simulator, on an Android Virtual Device, or on a physical mobile device.

Running on the iOS simulator

From the demo/ directory:

yarn ios

This will compile and install the demo app in the iOS simulator (first run takes a few minutes). It will then start the Expo development server to load the demo app.

Running on the Android emulator

From the demo/ directory:

adb reverse tcp:8085 tcp:8085
yarn android

This will compile and install the demo app in the emulator (first run takes a few minutes). It will then start the Expo development server to load the demo app.

Running on a physical device

The demo uses a local Expo development build, not Expo Go. Plug in the device (Developer Mode on iOS, USB debugging on Android). Make sure your mobile device and development machine are connected to the same Wi-Fi network.

From the demo/ directory:

BASE_URL="http://X.X.X.X:8085" yarn ios --device

or

BASE_URL="http://X.X.X.X:8085" yarn android --device

[!NOTE] Replace X.X.X.X with the IP of your machine. This is needed in order for your physical device to be able to request the example XML files from your development machine.

This compiles Hyperview onto the device (first run takes a few minutes) and starts Metro. Metro displays a QR code in the terminal.

Developing Hyperview Core Features

As you're developing new features in the Hyperview library, you can use the demo app along with this special command to help you quickly test your changes:

From the demo/ directory (in a separate terminal):

yarn sync

This command will copy all the files from the hyperview/src directory, into the demo/node_modules/hyperview/src directory, and watch for any more changes.

You can also pass as an additional argument the root path of your own react-native app where you've installed hyperview to perform the same sync/watch operation. e.g.

yarn sync ../projects/my-cool-app

Tip

You may stop this with Ctrl + C

Troubleshooting

If Metro opens Expo Go instead of the Hyperview demo, uninstall Expo Go from the simulator or device and run yarn ios or yarn android again.

Physical iOS device builds require Automatic Signing with a Personal Team in Xcode. A paid Apple Developer account is not required.

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.