Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,19 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Dart for pub publish
- name: Setup Flutter for pub publish
if: ${{ steps.version_check.outputs.release_type == 'standard' }}
uses: dart-lang/setup-dart@v1
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true

- name: Publish to pub.dev (dry-run check)
if: ${{ steps.version_check.outputs.release_type == 'standard' && steps.version_check.outputs.dry-run == 'true' }}
run: |
echo "[DRY-RUN MODE] Running pub publish dry-run"
dart pub get
dart pub publish --dry-run
flutter pub get
flutter pub publish --dry-run

- name: Publish to pub.dev (real)
if: ${{ steps.version_check.outputs.release_type == 'standard' && steps.version_check.outputs.dry-run == 'false' }}
Expand Down Expand Up @@ -368,4 +371,20 @@ jobs:
run: |
echo "❌ Release failed!"
echo "Please check the logs and try again."
exit 1
exit 1

- name: print publish info
run: |
RELEASE_VERSION="${{ needs.release.outputs.increment }}"
RELEASE_TYPE="${{ needs.release.outputs.release_type }}"

if [ "$RELEASE_TYPE" = "standard" ]; then
echo "[publish info] dependencies:"
echo "[publish info] agora_rtm: ^$RELEASE_VERSION"
else
echo "[publish info] dependencies:"
echo "[publish info] agora_rtm:"
echo "[publish info] git:"
echo "[publish info] url: https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK.git"
echo "[publish info] ref: $RELEASE_VERSION"
fi
70 changes: 63 additions & 7 deletions .github/workflows/run_update_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
target_branch:
description: 'Target branch to compare against. If a branch name, will compare directly against it. If a commit hash or tag, a new branch named "special/<pub_version>" will be created from that ref. The pub_version will be either the input pub_version or latest version from target branch pubspec.yaml. Defaults to "main".'
type: string
required: true
required: false
default: 'main'
pub_version:
description: 'Target pub version to update dependencies to. If empty, will use the latest version from target branch pubspec.yaml.'
Expand All @@ -19,12 +19,12 @@ on:
required: true
default: ''
run_gen_code:
description: 'Whether to run gen code, default is false'
description: 'Whether to run gen code, default is true'
type: boolean
required: false
default: false
default: true
code_gen_public_headers:
description: 'The public headers to generate, e.g. rtc_4.5.0, leave empty will use the same as the target branch'
description: 'The public headers to generate, e.g. rtm_2.2.5. If empty, will automatically extract from dependencies_content (recommended). If dependencies_content is also empty, will use the same as the target branch.'
type: string
required: false
default: ''
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Checkout target branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.target_branch }}
ref: ${{ inputs.target_branch || github.ref_name }}
fetch-depth: '1'
lfs: 'true'
submodules: 'true'
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
id: prepare_target_branch
uses: ./.github/actions/prepare_branch
with:
target_branch: ${{ inputs.target_branch }}
target_branch: ${{ inputs.target_branch || github.ref_name }}
pub_version: ${{ inputs.pub_version }}
branch_group: "special"
working_directory: ./
Expand All @@ -110,17 +110,59 @@ jobs:
# Update pub version into pubspec.yaml
sed -i '' "s/version: .*/version: ${{ inputs.pub_version }}/" pubspec.yaml

- name: Extract RTM version from dependencies
id: extract_rtm_version
if: ${{ inputs.run_gen_code == true }}
shell: bash
run: |
# Priority:
# 1. If code_gen_public_headers is explicitly provided, use it directly
# 2. Extract from dependencies_content (priority: Windows > iOS > macOS > Android)
# 3. If both empty, leave empty to use current branch version

if [ -n "${{ inputs.code_gen_public_headers }}" ]; then
rtm_version="${{ inputs.code_gen_public_headers }}"
echo "Using explicitly provided version: ${rtm_version}"
else
dependencies_json='${{ steps.parse_dependencies_content.outputs.matches }}'

if [ -n "$dependencies_json" ] && [ "$dependencies_json" != "null" ]; then
# Extract version from platform objects (priority: Windows > iOS > macOS > Android)
version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "Windows") | .version' | head -n1)
[ -z "$version" ] && version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "iOS") | .version' | head -n1)
[ -z "$version" ] && version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "macOS") | .version' | head -n1)
[ -z "$version" ] && version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "Android") | .version' | head -n1)

# Remove -build.X suffix and format as rtm_X.X.X
if [ -n "$version" ] && [ "$version" != "null" ]; then
version=$(echo "$version" | sed 's/-build\.[0-9]*$//')
rtm_version="rtm_${version}"
echo "Extracted version from dependencies: ${rtm_version}"
else
rtm_version=""
echo "No version found in dependencies"
fi
else
rtm_version=""
echo "No dependencies_content provided"
fi
fi

echo "rtm_version=${rtm_version}" >> $GITHUB_OUTPUT
[ -n "$rtm_version" ] && echo "Final version: ${rtm_version}" || echo "No version specified, will use current branch"

- name: Run gen code
if: ${{ inputs.run_gen_code == true }}
uses: ./.github/actions/gen_code
with:
code_gen_public_headers: ${{ inputs.code_gen_public_headers }}
code_gen_public_headers: ${{ steps.extract_rtm_version.outputs.rtm_version }}
flutter_channel: ${{ inputs.flutter_channel }}
flutter_version: ${{ inputs.flutter_version }}
working_directory: ./


- name: Commit and create pull request
id: create_pr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -141,6 +183,20 @@ jobs:
> This pull request is trigger by bot, you can checkout this branch and update it.
labels: |
ci:ready_release_special

- name: Output PR URL
if: steps.create_pr.outputs.pull-request-operation != 'none'
run: |
echo "::notice title=Pull Request Created::${{ steps.create_pr.outputs.pull-request-url }}"
echo ""
echo "✅ Pull Request: ${{ steps.create_pr.outputs.pull-request-url }}"
echo ""

- name: No changes detected
if: steps.create_pr.outputs.pull-request-operation == 'none'
run: |
echo "::warning title=No Changes::No changes detected, PR was not created"
echo "⚠️ No changes detected in the repository"



Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 2.2.6 (2025-11-11)

### Features

* update dependencies ([#235](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/235)) ([176c2d7](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/176c2d7af7bd9013a309e1a1c43301fecdb06df8))
* Update iris_method_channel: ^2.2.2 ([#179](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/179)) ([4e870a4](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/4e870a4006bd160abb6273773d546649ce3fc238))
* Upgrade RTM Native SDK 2.2.1 ([df1a024](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/df1a024ec28da04c90cecc7729d1b8aafe7eb142))

### Bug Fixes

* fix terra gen code config ([#221](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/221)) ([59cb782](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/59cb782d1544ad981d7d96ff5685cf08bea7c1ce))
* Fix use incorrect length value in RtmClientImplOverride.publish/StreamChannelImpl.publishTopicMessage ([#177](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/177)) ([b8e9ed1](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/b8e9ed14173744676fc7585d2a24ec288894a7c9))
* modify pr_closed configuration ([#215](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/215)) ([944281f](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/944281f524f43b9408de5989b1eb1df6ddf89304))
* modify terra/build.sh configuration ([#217](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/217)) ([a3e7a79](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/a3e7a79696fc215eb1033219fd2d5003fb3d247d))
* prevent type mismatches in IrisMethodChannel.wrapRtmStatus ([30c493a](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/30c493a7e6ea6c1cada798ff0b84e0dce4510e7e)), closes [#0](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/0) [#1](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/1)
* prvent request with invalid requestId ([#197](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/197)) ([f771e64](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/f771e644aee9fa1dfb31749e5b2adda851c5179c)), closes [#193](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/193) [#194](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/194)

## [2.2.5](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/compare/2.2.2...2.2.5) (2025-09-05)

### Bug Fixes
Expand Down
12 changes: 6 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ dependencies {
println("Include libs/*jar for debugging.")
api fileTree(dir: "libs", include: ["*.jar"])
} else {
# iris dependencies start
api 'io.agora.rtm:iris-rtm:2.2.5-build.2'
# iris dependencies end
// iris dependencies start
api 'io.agora.rtm:iris-rtm:2.2.6.2-build.1'
// iris dependencies end

# native dependencies start
api 'io.agora:agora-rtm:2.2.5'
# native dependencies end
// native dependencies start
api 'io.agora:agora-rtm-special:2.2.6.2'
// native dependencies end
}
}

Expand Down
20 changes: 12 additions & 8 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ post_install do |installer|
end

pre_install do |installer|
rtm_pod_path = File.join(installer.sandbox.root, 'AgoraRtm')
aosl_xcframework_path = File.join(rtm_pod_path, 'aosl.xcframework')

if File.exist?(aosl_xcframework_path)
puts "Deleting aosl.xcframework from #{aosl_xcframework_path}"
FileUtils.rm_rf(aosl_xcframework_path)
else
puts "aosl.xcframework not found, skipping deletion."
possible_paths = [
File.join(installer.sandbox.root, 'AgoraRtm_OC_Special', 'aosl.xcframework'),
File.join(installer.sandbox.root, 'AgoraRtm', 'aosl.xcframework')
]

possible_paths.each do |aosl_xcframework_path|
if File.exist?(aosl_xcframework_path)
puts "Deleting aosl.xcframework from #{aosl_xcframework_path}"
FileUtils.rm_rf(aosl_xcframework_path)
else
puts "aosl.xcframework not found at #{aosl_xcframework_path}, skipping."
end
end
end
17 changes: 9 additions & 8 deletions example/lib/src/rtm_api_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
_historyCountController = TextEditingController(text: '100');
_historyStartController = TextEditingController(text: '0');
_historyEndController = TextEditingController(text: '0');

}

@override
Expand Down Expand Up @@ -181,12 +180,15 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => StreamChannelDemo(userId: _userIdController.text.trim(), channelName: _channelNameController.text.trim(),),
builder: (context) => StreamChannelDemo(
userId: _userIdController.text.trim(),
channelName: _channelNameController.text.trim(),
),
),
);
},
icon: const Icon(Icons.message),
label: const Text('push streamChannel-demo page'),
label: const Text('push streamChannel-demo page'),
),
]),
_textField(_userIdController, 'Input user id'),
Expand Down Expand Up @@ -224,8 +226,8 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
storage: (event) {
logSink.log('[storage] event: ${event.toJson()}');
},
token: (channelName) {
logSink.log('[token] channelName: $channelName');
token: (event) {
logSink.log('[token] event: ${event.toJson()}');
},
);
await _rtmClient.setParameters('{"rtm.log_filter":2063}');
Expand All @@ -235,10 +237,10 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
_ispPolicyEnabled = v;
});
}),

_textField(_channelNameController, 'Input channel name'),
_button('RtmClient.login', () async {
logSink.log('[LoginResult] app id: ${config.appId} token: ${config.token}');
logSink.log(
'[LoginResult] app id: ${config.appId} token: ${config.token}');
final (status, _) = await _rtmClient.login(config.token);
logSink.log('[LoginResult] errorCode: ${status.errorCode}');
}),
Expand Down Expand Up @@ -471,7 +473,6 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
}),
],
),

_card(
[
Wrap(
Expand Down
37 changes: 18 additions & 19 deletions example/lib/src/stream_channel_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class _StreamChannelDemoState extends State<StreamChannelDemo> {
storage: (event) {
_addLog('[storage] event: ${event.toJson()}');
},
token: (channelName) {
_addLog('[token] channelName: $channelName');
token: (event) {
_addLog('[token] event: ${event.toJson()}');
},
);
await _rtmClient.setParameters('{"rtm.log_filter":2063}');
Expand Down Expand Up @@ -709,7 +709,6 @@ class _StreamChannelDemoState extends State<StreamChannelDemo> {
padding: const EdgeInsets.all(16.0),
child: Column(
children: [

TextField(
controller: _customTypeController,
decoration: const InputDecoration(
Expand Down Expand Up @@ -737,24 +736,24 @@ class _StreamChannelDemoState extends State<StreamChannelDemo> {
),
),
ElevatedButton(
onPressed: _isTopicJoined &&
_isLoggedIn &&
_streamChannel != null &&
_isChannelJoined
? _sendBasicTextMessage
: null,
child: const Text('7. Send Basic Message'),
),
onPressed: _isTopicJoined &&
_isLoggedIn &&
_streamChannel != null &&
_isChannelJoined
? _sendBasicTextMessage
: null,
child: const Text('7. Send Basic Message'),
),
const SizedBox(height: 8),
ElevatedButton(
onPressed: _isTopicJoined &&
_isLoggedIn &&
_streamChannel != null &&
_isChannelJoined
? _sendBasicBinaryMessage
: null,
child: const Text('8. Send Basic Binary Message'),
),
onPressed: _isTopicJoined &&
_isLoggedIn &&
_streamChannel != null &&
_isChannelJoined
? _sendBasicBinaryMessage
: null,
child: const Text('8. Send Basic Binary Message'),
),
],
),
),
Expand Down
8 changes: 4 additions & 4 deletions ios/agora_rtm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ Pod::Spec.new do |s|
s.vendored_frameworks = 'libs/*.xcframework'
else
# iris dependencies start
s.dependency 'AgoraIrisRTM_iOS', '2.2.5-build.2'
# iris dependencies end
s.dependency 'AgoraIrisRTM_iOS', '2.2.6.2-build.1'
# iris dependencies end

# native dependencies start
s.dependency 'AgoraRtm', '2.2.5'
# native dependencies end
s.dependency 'AgoraRtm_OC_Special', '2.2.6.2'
# native dependencies end
end

# Flutter.framework does not contain a i386 slice.
Expand Down
Loading
Loading