# `mix mob.push`
[🔗](https://github.com/genericjam/mob_dev/blob/main/lib/mix/tasks/mob.push.ex#L1)

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.

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_cookie

## Under 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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
