Repository navigation
Add over-the-air updates in silent mode - #232
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the
nativephp/mobile-otaplugin 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.phpholds only the mode, which defaults tosilent. That way the store build doesn't depend onNATIVEPHP_OTA_MODEbeing 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:registercan't edit that method because of the conditional spread for the social auth plugin.The only change in
composer.lockis 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.phpchecks that the plugin is registered and that the mode issilentwhen nothing overrides it. The suite passes in parallel: 2447 passed, 1 skipped.Screenshots
🤖 Generated with Claude Code