Skip to content

What is URL Application Upgrade?

URL application upgrade is a lightweight update mechanism where developers independently manage update files. Its core advantage is that there's no need to maintain file addresses in multiple places, and developers can directly control the entire version release process. It's particularly suitable for open-source projects, commercial projects with custom release rhythms, or scenarios that require a unified cross-platform update strategy, supporting the update and distribution of application installation packages and various custom files.

1. Core Concepts

1.1 Autonomous File Hosting

The core logic is to independently host the application's "application installation package" (APK/EXE/DMG/IPA, etc.) or "custom update files" on publicly accessible web service carriers, allowing clients to actively request verification and download.

Common hosting carriers: GitHub/Gitee/GitLab Releases functionality, self-built HTTPS servers, object storage services (such as AWS S3, Alibaba Cloud OSS, etc.).

2. Typical Workflow

  1. Client startup/periodic trigger: Actively send an update request to obtain version-related information about the remote file (such as file name version number, file metadata, etc.);

  2. Version comparison: Compare the current version number of the local application with the version number corresponding to the remote update file;

  3. Branch judgment: If remote version number > local version number, trigger the update process;

  4. Display update prompts to users (update logs and other information);

  5. Wait for user confirmation (forced updates can be configured if necessary);

  6. After user confirmation, directly download the corresponding application installation package or custom file through the configured "update file URL";

  7. After the download is complete, trigger subsequent processes according to the file type (application installation packages automatically trigger installation, custom files execute preset business logic), and the process ends.

If remote version number ≤ local version number: Display "currently already the latest version" prompt to the user (or silently end the process), and the process ends.

3. Key Implementation Points

Version Hosting Configuration Specifications

  • GitHub/Gitee/GitLab: Prioritize using the official Releases function, upload application installation packages or custom update files as release attachments, and directly obtain file addresses with permanent access links;

  • Self-built server/object storage: Ensure the service supports HTTPS protocol (avoid client security restrictions), stable file access (CDN acceleration for downloads is recommended), and supports resumable downloads (improve large file download experience);

4. Advantages and Features

  • Full process control: Independently decide the release rhythm, version history retention, and update strategy without third-party platform restrictions;

  • Low-cost implementation: No need to build/maintain a dedicated update server, can be implemented with existing web services or code hosting platforms;

  • High flexibility: Support phased rollouts (implemented by configuring different update file URLs), channel-specific updates (configure multiple update file URLs), and emergency hotfixes (quickly update hosted installation packages or custom files);

  • Cross-platform compatibility: The same core logic can be adapted to multiple terminals such as Windows, macOS, Android, and iOS (requires adaptation to each system's installation permissions);

  • Easy reuse and expansion: The core update logic can be encapsulated as a general module, and different projects can quickly access by simply replacing the "update file URL".

toolsetlink@163.com