flutterplaza_code_push 0.1.3
flutterplaza_code_push: ^0.1.3 copied to clipboard
Over-the-air code push updates for Flutter apps. Check for updates, download patches, and roll back — all at runtime.
0.1.3 #
- security / fix: refuse to apply a patch when the running Flutter engine has no code push support, instead of loading it into the VM and crashing. Previously, if a device's baseline build was made with a stock Flutter engine (or any engine whose ABI disagreed with the patch's build environment), the SDK called into a runtime hook that does not exist on that engine, which manifested as a release-mode
EXC_BAD_ACCESS (SIGSEGV)insideDRT_AllocateObjectreading from0x10— an unrecoverable crash with no diagnostic. The fix:CodePush.hasCodePushEngine(new, public) — async getter that probes theflutter/codepushmethod channel with a 2s timeout. Apps can use it to hide update UI on incompatible baselines.- Internal two-phase fingerprint probe:
- Phase 2 (when the engine exposes a
CodePush.getEngineAbimethod channel handler) — ABI-level comparison against the server'sengine_fingerprintfield. - Phase 1 (fallback for older engines) — presence check via the existing
CodePush.getReleaseVersionhandler. Treats "engine present" as sufficient and skips the ABI comparison.
- Phase 2 (when the engine exposes a
CodePush.checkAndInstallruns the probe before writing any patch bytes to disk or calling intodart:ui. If the probe returns null, the patch is rejected with a structured status message and a best-effort telemetry POST to/api/v1/telemetry/client-errorso publishers can see how many devices are stranded on incompatible baselines.- New
IncompatibleBaselineException(inmodels.dart) carryingreason,expectedFingerprint,actualFingerprintfor apps that want to handle the rejection explicitly.
- chore: suppress the analyzer's
undefined_functionwarning onui.codePushLoadModulewith a narrowly-scoped// ignorecomment, since the hook is provided dynamically at runtime by the custom engine and cannot be resolved statically. No behavior change.
0.1.2 #
- fix: safe type handling for server responses (prevents crashes from malformed data)
- fix: broad exception catch on all platform channel calls
0.1.1 #
- fix: license updated to BSD 3-Clause (was incorrectly MIT)
- fix: README license reference corrected
- add:
.pubignoreto exclude build artifacts from pub.dev archive - add:
topicsandissue_trackerto pubspec.yaml for discoverability
0.1.0 #
- Initial release
CodePush.checkForUpdate()— check server for available patchesCodePush.downloadAndApply()— download and install a patch (with progress callback)CodePush.currentPatch— get info about the active patchCodePush.isPatched— check if running with a patchCodePush.rollback()— remove the active patchCodePush.installPatch()— install a patch from raw bytesCodePush.releaseVersion— get the baseline release versionCodePush.cleanupOldPatches()— free disk spaceCodePush.checkForUpdatePeriodically()— periodic background checksCodePush.patchCount— number of stored patches