Skip to the content ForoHackers
Log inJoin

Cross-platform apps: start here

Cross-platform apps
#3165 · · Quote · Report

Cross-platform development means building one app that runs on several systems, such as Android, iOS and the web, from a shared codebase instead of one per platform. It saves effort and keeps behaviour consistent, and it costs you some fit with each platform. The skill is knowing what to share and what to keep native.

Key concepts

  • Shared logic, separate surface: business rules and data code travel well; interface and device features often do not.
  • Approaches: a web view wrapping a web app, a framework that draws its own interface, or one that maps to native controls.
  • Native bridges: code that calls a platform's own features, such as sensors, files and notifications.
  • Platform conventions: navigation, gestures and settings differ, and users notice when an app ignores them.
  • Testing the matrix: each platform, version and screen size is a place for a different bug.

Vocabulary

  • Native: code written with a platform's own language and toolkit.
  • Web view: a browser component embedded in an app.
  • Bridge: the layer that lets shared code call platform code.
  • Progressive web app: a web app installable on a device, with some offline ability.

What to study, in order

  1. Build one small app natively on a platform, so you know what native feels like.
  2. Build the same app as a progressive web app and note what it cannot reach.
  3. Build it again with a cross-platform framework, and list what was shared and what was not.
  4. Write a bridge to one native feature, such as the camera or the file picker.
  5. Test on two platforms and a small and a large screen, and record every difference.

Related tags

#android #ios #frontend #webassembly

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply