Compiles the project and hot-pushes updated BEAM modules to all running Android and iOS devices — no app restart.
The apps must already be running (start them with mix mob.connect or
mix mob.deploy first). Modules are loaded into the live BEAM in place,
equivalent to calling nl(Module) in IEx for each changed module.
Only BEAMs are pushed, never native code: if a plugin with a NIF was
activated since the last mix mob.deploy --native, it warns that the
installed app was built without it (see MobDev.Plugin.NifActivation).
Options: --all Push all modules, not just those changed since last compile --cookie Erlang cookie (default: mob_secret)
Examples:
mix mob.push
mix mob.push --all
mix mob.push --cookie my_cookieUnder the hood
mix mob.push is a scripted version of the IEx hot-code-push workflow:
mix compile
# For each changed module, on each connected node:
nl(MyApp.SomeScreen)
# which calls:
:rpc.call(node, :code, :load_binary, [MyApp.SomeScreen, path, beam_binary])The nl/1 built-in in IEx does the same thing for a single module. mix mob.push
does it for all changed modules across all connected nodes in one shot.