feat(live-update): add channel to FetchLatestBundleResult#799
Open
feat(live-update): add channel to FetchLatestBundleResult#799
channel to FetchLatestBundleResult#799Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for returning the resolved/actual bundle channel (after any forced channel assignment) from fetchLatestBundle(), aligning the SDK result with what the backend ultimately served.
Changes:
- Added optional
channeltoFetchLatestBundleResult(TypeScript + native iOS/Android result serialization). - Extended the iOS/Android latest-bundle API response parsing to read
channelNameand forward it into the result. - Clarified
channeloption wording inFetchLatestBundleOptionsandSyncOptions, and updated README docs accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/live-update/src/definitions.ts | Updates option docs and adds channel to FetchLatestBundleResult. |
| packages/live-update/ios/Plugin/Protocols/Api/GetLatestBundleResponse.swift | Adds channelName to the decoded API response model. |
| packages/live-update/ios/Plugin/LiveUpdate.swift | Maps channelName from the API response into FetchLatestBundleResult.channel. |
| packages/live-update/ios/Plugin/Classes/Results/FetchLatestBundleResult.swift | Serializes channel into the JS result when present. |
| packages/live-update/android/.../results/FetchLatestBundleResult.java | Adds channel field and serializes it into the JS result when present. |
| packages/live-update/android/.../api/GetLatestBundleResponse.java | Parses channelName from the API response and exposes a getter. |
| packages/live-update/android/.../LiveUpdate.java | Forwards channelName into the FetchLatestBundleResult. |
| packages/live-update/README.md | Documents the new channel result property and clarifies option descriptions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@capawesome/capacitor-age-signals
@capawesome-team/capacitor-android-battery-optimization
@capawesome/capacitor-android-dark-mode-support
@capawesome/capacitor-android-edge-to-edge-support
@capawesome-team/capacitor-android-foreground-service
@capawesome/capacitor-app-review
@capawesome/capacitor-app-shortcuts
@capawesome/capacitor-app-update
@capawesome/capacitor-apple-sign-in
@capawesome/capacitor-asset-manager
@capawesome/capacitor-background-task
@capawesome/capacitor-badge
@capawesome/capacitor-cloudinary
@capawesome-team/capacitor-datetime-picker
@capawesome-team/capacitor-file-opener
@capawesome/capacitor-file-picker
@capawesome/capacitor-google-sign-in
@capawesome/capacitor-libsql
@capawesome/capacitor-live-update
@capawesome/capacitor-managed-configurations
@capawesome/capacitor-photo-editor
@capawesome/capacitor-posthog
@capawesome/capacitor-realtimekit
@capawesome/capacitor-screen-orientation
@capawesome/capacitor-screenshot
@capawesome/capacitor-square-mobile-payments
@capawesome/capacitor-superwall
@capawesome/capacitor-torch
commit: |
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.
Summary
channelproperty toFetchLatestBundleResultthat returns the actual/resolved channel the bundle is from (after applying any forced channel assignment)channelproperty descriptions inFetchLatestBundleOptionsandSyncOptionsto clarify they represent the SDK preference and may be overridden by a forced channel assignmentchannelNamefield to the API response parser (GetLatestBundleResponse) on both Android and iOSUsage