There are many different options to test native functionality depending on your target platforms and needs.

Ionic DevApp

Ionic DevApp extends the capabilities of Ionic Framework, making it easy to test apps directly on devices. DevApp offers a realtime view of changes as they're being made, with a rich library of pre-installed native plugins to test native features of the app.

There's no need to install complicated Native SDKs - all it takes is one simple command, ionic serve, and apps running anywhere DevApp is installed will be immediately available to preview, with LiveReload to refresh changes as soon as they're made.

Getting started

First, download the Ionic DevApp. It is available in the iOS App Store as well as Google Play
Running Overview - 图1Get it on Google Play
With DevApp installed, sign up or login to an Ionic Account.

DevApp is a free service that comes with every Ionic Account.

Serving the App

Make sure the device running DevApp and the computer are on the same network, then run ionic serve from the command line in the project's directory.

ionic serve > ng run app:serve —host=0.0.0.0 —port=8100 [INFO] Development server running! Local: http://localhost:8100 External: http://192.168.1.169:8100 DevApp: [email protected] on ionic-home-router.network Use Ctrl+C to quit this process [INFO] Browser window opened to http://localhost:8100!
With ionic serve running, open DevApp and select the app from the currently running app list.

dev app with running app

Now if the app calls any native functionality, DevApp can handle this and actually return the correct native implementation.

DevApp has a select list of plugin it supports, so check out the DevApp docs for a complete list.