Skip to content

Add over-the-air updates in silent mode - #232

Merged
simonhamp merged 1 commit into
mainfrom
feat/ota-silent-updates
Nov 28, 2026
Merged

simonhamp merged 1 commit into
mainfrom
feat/ota-silent-updates

Conversation

@simonhamp

Copy link
Copy Markdown
Member

This adds the nativephp/mobile-ota plugin at 1.0.2 and runs it in silent mode.

In silent mode the app checks for an over-the-air update once per launch, in the background. If there is one, it downloads it and applies it the next time the app starts. Nothing shows on screen and the launch never waits for it. Silent mode means nobody gets asked anything. A fix just turns up on the next launch.

config/nativephp-ota.php holds only the mode, which defaults to silent. That way the store build doesn't depend on NATIVEPHP_OTA_MODE being set in Bifrost. The plugin's own config fills in everything else.

OTA only works in store builds that Bifrost signs. Bifrost writes the app's identity into the build: the project, the Arc and the shell fingerprint. A local build has none of that, so the check stops before it goes online.

The project needs OTA switched on in Bifrost before anything gets sent. Only installs of the next store build will get updates. Anyone on an older build has to update from the store first.

The provider is registered in plugins() by hand. native:plugin:register can't edit that method because of the conditional spread for the social auth plugin.

The only change in composer.lock is the new mobile-ota package. mobile-ota needs iOS 18.2 and Android API 26, and the app already targets iOS 18.2 and API 33.

Silent mode in 1.0.2 was tried on an iPhone against a stand-in update server. It checked, got an offer, downloaded the file and refused it because it wasn't signed, all in the background. Android hasn't been tried on a device yet.

tests/Feature/OtaTest.php checks that the plugin is registered and that the mode is silent when nothing overrides it. The suite passes in parallel: 2447 passed, 1 skipped.

Screenshots

  • No visible change

🤖 Generated with Claude Code

This adds nativephp/mobile-ota 1.0.2 and turns on its silent mode. The
app checks for an update once per launch, in the background, downloads
it if there is one, and applies it the next time it starts. Nothing is
shown on screen and the launch never waits for it.

config/nativephp-ota.php only sets the mode, so a store build doesn't
rely on NATIVEPHP_OTA_MODE being set in Bifrost. The plugin's own
config fills in the rest from what Bifrost writes into the build.

The provider is added to plugins() by hand, because
native:plugin:register can't edit that method with the conditional
social auth spread in it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review November 28, 2026 11:49
@simonhamp
simonhamp merged commit 0792f1b into main Nov 28, 2026
4 checks passed
@simonhamp
simonhamp deleted the feat/ota-silent-updates branch November 28, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant