Native app wrapper for anvil apps on IOS/Android

Would it be possible for Anvil (or volunteers) to supply code for native apps for IOS and Android that could:

  1. run your Anvil app in an iframe.
  2. provide a method for the Anvil app to send native push messages via the native app.

This could make it easier to distribute the app to users and easier to send reliable push notifications (sending push through firebase+service workers is hard and unreliable)

Does this sound like something that could work, or is this a bad idea?

1 Like

We actually did this for one of our apps via Flutter.
Works pretty good - but I can’t share the code as is unfortuatelly.

But the native code is pretty basic anyways.

FlutterApp with (Iframe & Anvil Bridge) + Anvil Bridge + Anvil App
The bridge is just an abstraction layer over the javascript communication channels for each app.

It’s not quite a native app and some stuff does not work (dropdowns) but its ok if you need to convert an anvil app to native fast.

2 Likes

Cool, thanks for verifying that it can be done!

Strange that the dropdowns (other things?) don’t work in the iFrame.