Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## [Unreleased]

### Fixed

- **`mix mob.release` builds the native code from the current plugin set
(MOB-404).** `mix mob.release --android` never rebuilt the native library:
Gradle imported whatever `jniLibs/<abi>/lib<app>.so` the last
`mix mob.deploy --native` in the checkout left behind, so a release after
adding or bumping a native plugin shipped a stale `.so` and crashed at
launch (Operator 1.0.0 with `mob_sensors`: `UnsatisfiedLinkError …
MobSensorsBridge.nativeRegister()`). The release now runs the same native
build as `mix mob.deploy --native` (`MobDev.NativeBuild.build_android_native/2`,
factored out of the deploy path; no device needed) for every Gradle
`abiFilters` ABI before `bundleRelease`, and refuses an ABI it can't build
instead of shipping a leftover library. When zig isn't used, a leftover
`lib<app>.so` is removed so CMake compiles it from source. Both release
pipelines (Android and iOS) now also regenerate the plugin-derived files a
dev build does (`MobDev.NativeBuild.prepare_plugin_build_state!/0`): the
iOS release linked the checked-in `driver_tab_ios.c` as is, so a NIF plugin
added since it was last generated linked but never registered.

## [0.7.15] - 2026-10-05

### Fixed
Expand Down
13 changes: 8 additions & 5 deletions lib/mix/tasks/mob.release.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,17 @@ defmodule Mix.Tasks.Mob.Release do
## What --android does

1. Regenerates the `mob.exs` `url_schemes` deep-link intent filter in
`AndroidManifest.xml`, then ensures the Android OTP runtime is cached
(`~/.mob/cache/otp-android-*`).
2. Stages a temp tree: OTP runtime + app BEAMs + exqlite BEAMs.
3. Runs `MobDev.OtpAssetBundle.build/2` to produce
`AndroidManifest.xml`.
2. Regenerates the plugin-derived files and runs the same native build as
`mix mob.deploy --native` for every `abiFilters` ABI, so
`jniLibs/<abi>/lib<app>.so` links the current plugins instead of
whatever the last deploy left there. Needs zig and the NDK, not a device.
3. Stages a temp tree: OTP runtime + app BEAMs + exqlite BEAMs.
4. Runs `MobDev.OtpAssetBundle.build/2` to produce
`android/app/src/release/assets/otp.zip` — stripped and compressed.
`MobBridge.extractOtpIfNeeded()` extracts this on first launch. The
release-variant asset dir keeps this out of debug builds.
4. Runs `./gradlew bundleRelease` to produce the signed AAB.
5. Runs `./gradlew bundleRelease` to produce the signed AAB.

Use `mix mob.publish --android` to upload to Google Play.
"""
Expand Down
Loading
Loading