GenericJam
Mob 0.9.40 has been released.
Added
-
Named screen-reader actions on a box:
accessibility_actions. A list
of{label, {pid, tag}}; each shows in VoiceOver’s actions rotor and
TalkBack’s actions menu, and choosing one delivers{:tap, tag}, as
on_tapdoes. With a box’s existingaccessibility_labeland the
offset_x/offset_yevery node takes (now documented), this makes
regions drawn on a:canvasreachable: lay an empty labelled box over
each one, with actions for what a finger would do there. A box without
on_taptakes no touches, so the canvas keeps its drag. Android needs
mob_new’s matchingMobBridge.ktchange. See the components guide,
:boxand:canvas. (MOB-608) -
Per-screen status and navigation bar appearance. A root node’s
system_bars: :light_content | :dark_content | :autosets the bars’ icons
for as long as that screen shows.:auto(the default) picks whichever
contrasts better with what is behind the bars: a Scroll, or a square Column or
Row, root’s opaquebackground, else the theme’s:background. So a dark
app in light mode, or a dark camera screen, gets light icons instead of
following the phone’s light/dark setting. iOS applies it in
MobHostingController; Android needs mob_new’s matchingMainActivity.kt
andMobBridge.ktchange, which also paints the root’s background under
the bars as iOS does, so release this together with that mob_new change.
See the theming guide, “Status and navigation bars”. (MOB-604) -
Screens can intercept the system back gesture (MOB-611). An optional
handle_back/1returns{:pop, socket}to let back go ahead or
{:stay, socket}to stay, e.g. to ask “Discard 2 pages?” first. It covers
the Android back button and gesture and the iOS edge swipe.
Mob.ScreenCase.render_back/1tests it in the BEAM;Mob.Test.back/2on a
device. -
Tests can see and answer alerts.
Mob.Test.alerts/1lists the alerts
and action sheets open in the window (title, message, buttons, and the
screen that showed each), the one in front first, and
Mob.Test.answer_alert/2presses a button by its label: the native layer
presses it through the same path a tap takes, the dialog closes, and the
screen that showed it receives that button’s{:alert, action}. An alert
is answered once, whether a tap and an answer race or two answers do.
Mob.ScreenCasegets the samealerts/1andanswer_alert/2for host
tests, whereMob.Alertnow skips the native dialog instead of crashing
(as doestoast/3). Tests list an alert only if the screen kept the
socketMob.Alertreturns, so return it from your callback. (MOB-610)Two behaviour changes come with it. An alert’s answer now goes to the
screen whose socket showed it: the screen itself, the screen that handed a
task its socket, or the screen a component belongs to. Before, it went to
whichever screen was current when the alert was answered. The answer still
arrives if the callback dropped the socket; if that screen has stopped by
then, it goes to the window’s current screen. A screen that is no longer on
top gets its answer but can’t push or pop from it. And an alert kept on a
screen’s socket closes, unanswered, when that screen stops (it is popped,
say), as a component’s does when the component stops.Release order: this mob first (as 0.9.40), then mob_new’s matching
MobBridge.ktandbeam_jni.cchange, whose generated apps link mob’s
newmob_deliver_alert_answer. An Android app without that change shows
alerts as before, but tests can’t see or answer them, and
Mob.Test.capabilities/1reportsalert_answer: false. See the testing
guide, “Testing alerts and action sheets”.
Changed
- Upgrading: rebuild natively (
mix mob.deploy --native, or a release
build). This release changesmob_nif’s native functions (alerts and
action sheets, system bars, screen-reader actions) and Mob’s own iOS
sources. A BEAM-only deploy of 0.9.40 onto an app built with an older mob
fails to loadmob_nif, and every screen crashes on launch, on both
platforms. - Over-the-air bundles (mob_deliver) and the new features. A bundle
carries only your modules, so it never brings these NIF changes to a
device. Publish screens that usehandle_back/1oraccessibility_actions
with the manifest’smin_app_versionset to a 0.9.40 build: on
an older buildhandle_back/1is ignored (back pops without asking) and
accessibility_actionsfails the render. - iPad action sheets without a cancel button. Tapping outside one now
answers{:alert, :dismiss}; it used to send nothing. A screen that
defineshandle_info/2without a catch-all crashes on it; match
{:alert, :dismiss}or keep a catch-all. - Docs: screen orientation. Device Capabilities shows mob_dev 0.7.37’s
orientations: :portrait | :landscape | :allinmob.exs, which locks both
the iPhone and the Android launcher activity. - Docs: push registration failures. The Push Notifications and Device
Capabilities guides show mob_notify 0.3.0’s
{:push_token_error, :android, reason}and keep a catch-all
handle_info/2in their examples: a screen that defineshandle_info/2
losesMob.Screen’s default catch-all, and an unmatched message crashes it. - Docs: observing a running app with Insider. The Agentic Coding guide
shows how an agent records a running dev app (iOS simulator, Android
emulator or phone; not a physical iPhone, whose node isn’t on loopback)
with Insider’s
insider-labCLI andmix mob.insider(mob_dev 0.7.37 or later): when to
reach for it rather thanMob.Testor a test, and the mark, act, digest
loop. The app needs no dependency or config:mix mob.deploymarks dev
builds as development andmix mob.releasemarks release builds as
production, so Insider refuses them. Troubleshooting points to it for an app
that misbehaves while the logs show nothing.
Mob Info
Classification: Hybrid Mobile Framework
Description: BEAM-on-device mobile framework for Elixir. OTP runs inside your iOS and Android apps — embedded directly in the app bundle, no server required. Screens are GenServers; the UI is rendered by Compose and SwiftUI via a thin NIF.
Forum/tag: mob
Click here to view Mob’s main announcement thread.
Trending in News & Updates
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #code-sync
- #exunit
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #ai
- #authentication
- #elixirconf-us
- #umbrella
- #full-time-contract
- #blog-post
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-eu
- #distillery
- #security
- #processes
- #api
- #forms
- #hex









