From 5b2a51370cdd1c32c444701c47abbc32f65e0cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BC=BA?= Date: Fri, 6 Nov 2026 11:43:12 +0800 Subject: [PATCH 1/4] update version --- Android/APIExample/gradle.properties | 2 +- .../APIExample-Audio.xcodeproj/project.pbxproj | 4 ++-- iOS/APIExample-OC/APIExample-OC.xcodeproj/project.pbxproj | 8 ++++---- .../APIExample-SwiftUI.xcodeproj/project.pbxproj | 8 ++++---- iOS/APIExample/APIExample.xcodeproj/project.pbxproj | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Android/APIExample/gradle.properties b/Android/APIExample/gradle.properties index 384f9d744..ea6bc007e 100644 --- a/Android/APIExample/gradle.properties +++ b/Android/APIExample/gradle.properties @@ -25,4 +25,4 @@ simpleFilter = false # read enable stream encrypt section on README first before set this flag to TRUE streamEncrypt = false -rtc_sdk_version = 4.7.0 +rtc_sdk_version = 4.7.1 diff --git a/iOS/APIExample-Audio/APIExample-Audio.xcodeproj/project.pbxproj b/iOS/APIExample-Audio/APIExample-Audio.xcodeproj/project.pbxproj index 06fbaebeb..7f387131d 100644 --- a/iOS/APIExample-Audio/APIExample-Audio.xcodeproj/project.pbxproj +++ b/iOS/APIExample-Audio/APIExample-Audio.xcodeproj/project.pbxproj @@ -979,7 +979,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1049,7 +1049,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/iOS/APIExample-OC/APIExample-OC.xcodeproj/project.pbxproj b/iOS/APIExample-OC/APIExample-OC.xcodeproj/project.pbxproj index a358f4740..4725d4c44 100644 --- a/iOS/APIExample-OC/APIExample-OC.xcodeproj/project.pbxproj +++ b/iOS/APIExample-OC/APIExample-OC.xcodeproj/project.pbxproj @@ -1637,7 +1637,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-oc"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1678,7 +1678,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-oc"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1711,7 +1711,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-oc.Agora-ScreenShare-Extension-OC"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1740,7 +1740,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-oc.Agora-ScreenShare-Extension-OC"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/iOS/APIExample-SwiftUI/APIExample-SwiftUI.xcodeproj/project.pbxproj b/iOS/APIExample-SwiftUI/APIExample-SwiftUI.xcodeproj/project.pbxproj index 579dc01d6..24298d01e 100644 --- a/iOS/APIExample-SwiftUI/APIExample-SwiftUI.xcodeproj/project.pbxproj +++ b/iOS/APIExample-SwiftUI/APIExample-SwiftUI.xcodeproj/project.pbxproj @@ -1403,7 +1403,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-swiftUI"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1442,7 +1442,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-swiftUI"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1472,7 +1472,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-swiftUI.Agora-ScreenShare-Extension"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1503,7 +1503,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples-swiftUI.Agora-ScreenShare-Extension"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/iOS/APIExample/APIExample.xcodeproj/project.pbxproj b/iOS/APIExample/APIExample.xcodeproj/project.pbxproj index 6410afadd..c9021396b 100644 --- a/iOS/APIExample/APIExample.xcodeproj/project.pbxproj +++ b/iOS/APIExample/APIExample.xcodeproj/project.pbxproj @@ -2399,7 +2399,7 @@ "$(inherited)", "$(PROJECT_DIR)/Agora-ScreenShare-Extension", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples.Agora-ScreenShare-Extension"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2435,7 +2435,7 @@ "$(inherited)", "$(PROJECT_DIR)/Agora-ScreenShare-Extension", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = "io.agora.api.examples.Agora-ScreenShare-Extension"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -2592,7 +2592,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -2665,7 +2665,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", From 94e5114db345149adc75070c2ef4b700f2328eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BC=BA?= Date: Fri, 6 Nov 2026 12:49:02 +0800 Subject: [PATCH 2/4] update version --- Android/APIExample-Audio/gradle.properties | 2 +- Android/APIExample-Compose/gradle.properties | 2 +- iOS/APIExample-Audio/Podfile | 4 ++-- iOS/APIExample-OC/Podfile | 4 ++-- iOS/APIExample-SwiftUI/Podfile | 4 ++-- iOS/APIExample/Podfile | 4 ++-- macOS/APIExample.xcodeproj/project.pbxproj | 4 ++-- macOS/Podfile | 4 ++-- windows/APIExample/install.ps1 | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Android/APIExample-Audio/gradle.properties b/Android/APIExample-Audio/gradle.properties index 97f6f46d5..7806e177f 100644 --- a/Android/APIExample-Audio/gradle.properties +++ b/Android/APIExample-Audio/gradle.properties @@ -23,4 +23,4 @@ android.nonFinalResIds=false # read enable simple filter section on README first before set this flag to TRUE simpleFilter = false -rtc_sdk_version = 4.7.0 +rtc_sdk_version = 4.7.1 diff --git a/Android/APIExample-Compose/gradle.properties b/Android/APIExample-Compose/gradle.properties index fad88fe86..ce95e7a7c 100644 --- a/Android/APIExample-Compose/gradle.properties +++ b/Android/APIExample-Compose/gradle.properties @@ -22,4 +22,4 @@ kotlin.code.style=official # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true -rtc_sdk_version = 4.7.0 +rtc_sdk_version = 4.7.1 diff --git a/iOS/APIExample-Audio/Podfile b/iOS/APIExample-Audio/Podfile index bd9c7d606..7e8761915 100644 --- a/iOS/APIExample-Audio/Podfile +++ b/iOS/APIExample-Audio/Podfile @@ -7,10 +7,10 @@ target 'APIExample-Audio' do pod 'Floaty', '~> 4.2.0' pod 'AGEVideoLayout', '~> 1.0.2' - pod 'AgoraAudio_iOS', '4.7.0' + pod 'AgoraAudio_iOS', '4.7.1' # pod 'sdk', :path => 'sdk.podspec' end pre_install do |installer| - # system("sh .download_script.sh 4.7.0 true") + # system("sh .download_script.sh 4.7.1 true") end diff --git a/iOS/APIExample-OC/Podfile b/iOS/APIExample-OC/Podfile index 43e0bc065..5f9e0aab1 100644 --- a/iOS/APIExample-OC/Podfile +++ b/iOS/APIExample-OC/Podfile @@ -2,7 +2,7 @@ # platform :ios, '9.0' def common_pods - pod 'AgoraRtcEngine_iOS', '4.7.0' + pod 'AgoraRtcEngine_iOS', '4.7.1' # pod 'sdk', :path => 'sdk.podspec' end @@ -26,5 +26,5 @@ target 'SimpleFilter' do end pre_install do |installer| - # system("sh .download_script.sh 4.7.0 true") + # system("sh .download_script.sh 4.7.1 true") end diff --git a/iOS/APIExample-SwiftUI/Podfile b/iOS/APIExample-SwiftUI/Podfile index a59f9d423..3a6e67496 100644 --- a/iOS/APIExample-SwiftUI/Podfile +++ b/iOS/APIExample-SwiftUI/Podfile @@ -2,7 +2,7 @@ # platform :ios, '9.0' def common_pods - pod 'AgoraRtcEngine_iOS', '4.7.0' + pod 'AgoraRtcEngine_iOS', '4.7.1' #pod 'sdk', :path => 'sdk.podspec' end @@ -32,5 +32,5 @@ end #end pre_install do |installer| -# system("sh .download_script.sh 4.7.0 true") +# system("sh .download_script.sh 4.7.1 true") end diff --git a/iOS/APIExample/Podfile b/iOS/APIExample/Podfile index 225da67a9..54142ec7d 100644 --- a/iOS/APIExample/Podfile +++ b/iOS/APIExample/Podfile @@ -3,7 +3,7 @@ platform :ios, '12.0' #source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' def common_pods - # pod 'AgoraRtcEngine_iOS', '4.7.0' + # pod 'AgoraRtcEngine_iOS', '4.7.1' pod 'sdk', :path => 'sdk.podspec' end @@ -37,7 +37,7 @@ target 'SimpleFilter' do end pre_install do |installer| -# system("sh .download_script.sh 4.7.0 true") +# system("sh .download_script.sh 4.7.1 true") end # Xcode 27 SDKs require iOS 15; retain each pod's default for older SDKs. diff --git a/macOS/APIExample.xcodeproj/project.pbxproj b/macOS/APIExample.xcodeproj/project.pbxproj index e96ccef99..78bfcd089 100644 --- a/macOS/APIExample.xcodeproj/project.pbxproj +++ b/macOS/APIExample.xcodeproj/project.pbxproj @@ -1747,7 +1747,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = io.agora.api.examples; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1779,7 +1779,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 4.7.0; + MARKETING_VERSION = 4.7.1; PRODUCT_BUNDLE_IDENTIFIER = io.agora.api.examples; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/macOS/Podfile b/macOS/Podfile index f0e61fc21..070eb4d5e 100644 --- a/macOS/Podfile +++ b/macOS/Podfile @@ -3,7 +3,7 @@ platform :osx, macos_deployment_target def common_pods - pod 'AgoraRtcEngine_macOS', '4.7.0' + pod 'AgoraRtcEngine_macOS', '4.7.1' # pod 'sdk', :path => 'sdk.podspec' end @@ -22,7 +22,7 @@ end post_install do |installer| - # system("sh .download_script.sh 4.7.0 true") + # system("sh .download_script.sh 4.7.1 true") installer.pods_project.targets.each do |target| target.build_configurations.each do |config| deployment_target = config.build_settings['MACOSX_DEPLOYMENT_TARGET'] diff --git a/windows/APIExample/install.ps1 b/windows/APIExample/install.ps1 index 12bef924a..b5d4dfd53 100644 --- a/windows/APIExample/install.ps1 +++ b/windows/APIExample/install.ps1 @@ -2,7 +2,7 @@ param( [switch]$RequireBeautyMaterial ) -$agora_sdk = 'https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v4.7.0_FULL.zip' +$agora_sdk = 'https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v4.7.1_FULL.zip' $ThirdPartysrc = 'https://demo-app-download.agora.io/api_example/ThirdParty.zip' $ThirdPartydes = 'ThirdParty.zip' $agora_des = 'AgoraSdk.zip' From 601b389def6c862072c5c8da730070733308de82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BC=BA?= Date: Tue, 10 Nov 2026 11:50:56 +0800 Subject: [PATCH 3/4] [FIX] NMS-31915: isolate stream encryption callbacks and engine lifetime - Guard Token and join callbacks with weak references, request generation, engine identity and channel checks on the main queue. - Stop preview, unregister custom packet processing, leave once and destroy the owned engine on exit; ignore queued remote video callbacks afterward. - Preserve the encryption inputs and update the UIKit case documentation. - Validation: Swift syntax, diff whitespace and staged Gitleaks checks passed. Full app compilation and RTC device regression were not run. --- .../StreamEncryption/StreamEncryption.swift | 126 +++++++++++------- iOS/APIExample/ARCHITECTURE.md | 2 +- 2 files changed, 77 insertions(+), 51 deletions(-) diff --git a/iOS/APIExample/APIExample/Examples/Advanced/StreamEncryption/StreamEncryption.swift b/iOS/APIExample/APIExample/Examples/Advanced/StreamEncryption/StreamEncryption.swift index 5968fb3fd..dd64be35c 100644 --- a/iOS/APIExample/APIExample/Examples/Advanced/StreamEncryption/StreamEncryption.swift +++ b/iOS/APIExample/APIExample/Examples/Advanced/StreamEncryption/StreamEncryption.swift @@ -79,6 +79,8 @@ class StreamEncryptionMain: BaseViewController { @IBOutlet weak var container: AGEVideoContainer! var agoraKit: AgoraRtcEngineKit! + private var joinRequestID = 0 + private var customEncryptionRegistered = false // indicate if current instance has joined channel var isJoined: Bool = false @@ -128,6 +130,7 @@ class StreamEncryptionMain: BaseViewController { } else { // your own custom algorithm encryption AgoraCustomEncryption.registerPacketProcessing(agoraKit) + customEncryptionRegistered = true } // enable video module and set up video encoding configs @@ -147,6 +150,9 @@ class StreamEncryptionMain: BaseViewController { } private func joinChannel(channelName: String) { + guard let engine = agoraKit else { return } + joinRequestID += 1 + let requestID = joinRequestID // set up local video to render your local camera preview let videoCanvas = AgoraRtcVideoCanvas() videoCanvas.uid = 0 @@ -166,21 +172,33 @@ class StreamEncryptionMain: BaseViewController { // 2. If app certificate is turned on at dashboard, token is needed // when joining channel. The channel name and uid used to calculate // the token has to match the ones used for channel join - NetworkManager.shared.generateToken(channelName: channelName, success: { token in - let result = self.agoraKit.joinChannel(byToken: token, - channelId: channelName, - info: nil, uid: 0) { [unowned self] (channel, uid, elapsed) -> Void in - self.isJoined = true - LogUtils.log(message: "Join \(channel) with uid \(uid) elapsed \(elapsed)ms", level: .info) - } - if result != 0 { - // Usually happens with invalid parameters - // Error code description can be found at: - // en: https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agoraerrorcode - // cn: https://doc.shengwang.cn/api-ref/rtc/ios/error-code - self.showAlert(title: "Error", message: "joinChannel call failed: \(result), please check your params") + NetworkManager.shared.generateToken(channelName: channelName) { [weak self, weak engine] token in + DispatchQueue.main.async { [weak self, weak engine] in + guard let self = self, let engine = engine, + self.joinRequestID == requestID, self.agoraKit === engine else { return } + if !(KeyCenter.Certificate ?? "").isEmpty && (token ?? "").isEmpty { + self.showAlert(title: "Error", message: "Token request failed") + return + } + let result = engine.joinChannel(byToken: token, channelId: channelName, + info: nil, uid: 0) { [weak self, weak engine] channel, uid, elapsed in + DispatchQueue.main.async { [weak self, weak engine] in + guard let self = self, let engine = engine, + self.joinRequestID == requestID, self.agoraKit === engine, + channel == channelName else { return } + self.isJoined = true + LogUtils.log(message: "Join \(channel) with uid \(uid) elapsed \(elapsed)ms", level: .info) + } + } + if result != 0 { + // Usually happens with invalid parameters + // Error code description can be found at: + // en: https://api-ref.agora.io/en/video-sdk/ios/4.x/documentation/agorartckit/agoraerrorcode + // cn: https://doc.shengwang.cn/api-ref/rtc/ios/error-code + self.showAlert(title: "Error", message: "joinChannel call failed: \(result), please check your params") + } } - }) + } } func getEncryptionSaltFromServer() -> Data { @@ -192,22 +210,30 @@ class StreamEncryptionMain: BaseViewController { } override func willMove(toParent parent: UIViewController?) { + super.willMove(toParent: parent) if parent == nil { - // leave channel when exiting the view - - agoraKit.leaveChannel() - agoraKit.enableEncryption(false, encryptionConfig: AgoraEncryptionConfig()) - guard let useCustom = configs["useCustom"] as? Bool else { return } - if useCustom { - // deregister packet processing - AgoraCustomEncryption.deregisterPacketProcessing(agoraKit) - if isJoined { - agoraKit.leaveChannel { (stats) -> Void in - LogUtils.log(message: "left channel, duration: \(stats.duration)", level: .info) - } - } - } + destroyEngine() + } + } + + private func destroyEngine() { + // Invalidate pending Token and SDK callbacks before releasing this session. + joinRequestID += 1 + isJoined = false + guard let engine = agoraKit else { return } + agoraKit = nil + engine.delegate = nil + engine.stopPreview() + if customEncryptionRegistered { + AgoraCustomEncryption.deregisterPacketProcessing(engine) + customEncryptionRegistered = false } + engine.leaveChannel() + engine.enableEncryption(false, encryptionConfig: AgoraEncryptionConfig()) + let canvas = AgoraRtcVideoCanvas() + canvas.view = nil + engine.setupLocalVideo(canvas) + AgoraRtcEngineKit.destroy() } } @@ -237,17 +263,17 @@ extension StreamEncryptionMain: AgoraRtcEngineDelegate { /// @param uid uid of remote joined user /// @param elapsed time elapse since current sdk instance join the channel in ms func rtcEngine(_ engine: AgoraRtcEngineKit, didJoinedOfUid uid: UInt, elapsed: Int) { - LogUtils.log(message: "remote user join: \(uid) \(elapsed)ms", level: .info) - - // Only one remote video view is available for this - // tutorial. Here we check if there exists a surface - // view tagged as this uid. - let videoCanvas = AgoraRtcVideoCanvas() - videoCanvas.uid = uid - // the view to be binded - videoCanvas.view = remoteVideo.videoView - videoCanvas.renderMode = .hidden - agoraKit.setupRemoteVideo(videoCanvas) + DispatchQueue.main.async { [weak self, weak engine] in + guard let self = self, let engine = engine, self.agoraKit === engine else { return } + LogUtils.log(message: "remote user join: \(uid) \(elapsed)ms", level: .info) + + // Only one remote video view is available for this tutorial. + let videoCanvas = AgoraRtcVideoCanvas() + videoCanvas.uid = uid + videoCanvas.view = self.remoteVideo.videoView + videoCanvas.renderMode = .hidden + engine.setupRemoteVideo(videoCanvas) + } } /// callback when a remote user is leaving the channel, note audience in live broadcast mode will NOT trigger this event @@ -255,16 +281,16 @@ extension StreamEncryptionMain: AgoraRtcEngineDelegate { /// @param reason reason why this user left, note this event may be triggered when the remote user /// become an audience in live broadcasting profile func rtcEngine(_ engine: AgoraRtcEngineKit, didOfflineOfUid uid: UInt, reason: AgoraUserOfflineReason) { - LogUtils.log(message: "remote user left: \(uid) reason \(reason)", level: .info) - - // to unlink your view from sdk, so that your view reference will be released - // note the video will stay at its last frame, to completely remove it - // you will need to remove the EAGL sublayer from your binded view - let videoCanvas = AgoraRtcVideoCanvas() - videoCanvas.uid = uid - // the view to be binded - videoCanvas.view = nil - videoCanvas.renderMode = .hidden - agoraKit.setupRemoteVideo(videoCanvas) + DispatchQueue.main.async { [weak self, weak engine] in + guard let self = self, let engine = engine, self.agoraKit === engine else { return } + LogUtils.log(message: "remote user left: \(uid) reason \(reason)", level: .info) + + // Unlink the remote view so the SDK releases its reference. + let videoCanvas = AgoraRtcVideoCanvas() + videoCanvas.uid = uid + videoCanvas.view = nil + videoCanvas.renderMode = .hidden + engine.setupRemoteVideo(videoCanvas) + } } } diff --git a/iOS/APIExample/ARCHITECTURE.md b/iOS/APIExample/ARCHITECTURE.md index 511c72ccc..1375ff2f4 100644 --- a/iOS/APIExample/ARCHITECTURE.md +++ b/iOS/APIExample/ARCHITECTURE.md @@ -44,7 +44,7 @@ own view/window hierarchy; do not use `Floaty.global`, which creates a window wi | SimpleFilter | `Examples/Advanced/SimpleFilter/SimpleFilter.swift` | `enableExtension()`, `setExtensionPropertyWithVendor()` | Apply audio/video filter via Agora Extension API | | QuickSwitchChannel | `Examples/Advanced/QuickSwitchChannel/QuickSwitchChannel.swift` | `joinChannel()`, `leaveChannel()` | Quickly switch between channels as audience | | JoinMultiChannel | `Examples/Advanced/JoinMultiChannel/JoinMultiChannel.swift` | `joinChannelEx()`, `takeSnapshotEx()` | Join multiple channels simultaneously via ex connection | -| StreamEncryption | `Examples/Advanced/StreamEncryption/StreamEncryption.swift` | `enableEncryption()` | Built-in and custom stream encryption | +| StreamEncryption | `Examples/Advanced/StreamEncryption/StreamEncryption.swift` | `enableEncryption()` | Built-in and custom stream encryption with session-guarded callbacks and complete engine cleanup on exit | | AudioMixing | `Examples/Advanced/AudioMixing/AudioMixing.swift` | `startAudioMixing()`, `stopAudioMixing()`, `adjustAudioMixingVolume()`, `setEffectsVolume()` | Mix local audio file with microphone input | | PrecallTest | `Examples/Advanced/PrecallTest/PrecallTest.swift` | `startEchoTest()`, `stopEchoTest()`, `startLastmileProbeTest()`, `stopLastmileProbeTest()` | Pre-call echo test and last-mile network probe | | MediaPlayer | `Examples/Advanced/MediaPlayer/MediaPlayer.swift` | `createMediaPlayer()`, `updateChannelEx()` | Play media files and publish to channel via media player | From 80eaf1255439cc7464c08304e24c2677ffca02ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BC=BA?= Date: Thu, 19 Nov 2026 16:20:37 +0800 Subject: [PATCH 4/4] [CHORE] Use overseas Agora CocoaPods CDN source Declare the Agora CocoaPods source in all iOS and macOS Podfiles and retain the public CDN for third-party pods. Keep the Android Agora Maven routing and the UIKit local SDK packaging entry point. Document the overseas dependency sources. --- docs/ai/project-matrix.md | 12 ++++++++++++ iOS/APIExample-Audio/Podfile | 4 +++- iOS/APIExample-OC/Podfile | 3 +++ iOS/APIExample-SwiftUI/Podfile | 3 +++ iOS/APIExample/Podfile | 4 +++- macOS/Podfile | 3 +++ 6 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/ai/project-matrix.md b/docs/ai/project-matrix.md index e340e456b..ffad47c82 100644 --- a/docs/ai/project-matrix.md +++ b/docs/ai/project-matrix.md @@ -28,6 +28,18 @@ not inject an Aliyun Maven repository for RTC dependencies. Validate Maven resol without a local SDK and with a fresh dependency cache; compiling with a bundled SDK does not validate the public repository. +## Apple SDK source + +All four iOS projects and the macOS project declare +`https://download.agora.io/cocoapods/` before `https://cdn.cocoapods.org/` in their +Podfiles. The Agora source provides the overseas SDK specs; the public CocoaPods CDN +remains available for third-party pods. This overseas repository uses the Agora Maven +and CocoaPods endpoints, not the Shengwang domestic endpoints. + +The iOS UIKit full project retains its local `sdk.podspec` release integration. +Its declared sources apply to published pods, including the SDK when compile CI switches +the local dependency to `AgoraRtcEngine_iOS`. + ## Scope Rules - SDK version, dependency, credential plumbing, CI, and packaging changes require review of diff --git a/iOS/APIExample-Audio/Podfile b/iOS/APIExample-Audio/Podfile index 7e8761915..f79a9b00d 100644 --- a/iOS/APIExample-Audio/Podfile +++ b/iOS/APIExample-Audio/Podfile @@ -1,7 +1,9 @@ +source 'https://download.agora.io/cocoapods/' +source 'https://cdn.cocoapods.org/' + # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' -#source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' target 'APIExample-Audio' do use_frameworks! diff --git a/iOS/APIExample-OC/Podfile b/iOS/APIExample-OC/Podfile index 5f9e0aab1..54f6731a5 100644 --- a/iOS/APIExample-OC/Podfile +++ b/iOS/APIExample-OC/Podfile @@ -1,3 +1,6 @@ +source 'https://download.agora.io/cocoapods/' +source 'https://cdn.cocoapods.org/' + # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' diff --git a/iOS/APIExample-SwiftUI/Podfile b/iOS/APIExample-SwiftUI/Podfile index 3a6e67496..ee2d7fa7a 100644 --- a/iOS/APIExample-SwiftUI/Podfile +++ b/iOS/APIExample-SwiftUI/Podfile @@ -1,3 +1,6 @@ +source 'https://download.agora.io/cocoapods/' +source 'https://cdn.cocoapods.org/' + # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' diff --git a/iOS/APIExample/Podfile b/iOS/APIExample/Podfile index 54142ec7d..2baf84f16 100644 --- a/iOS/APIExample/Podfile +++ b/iOS/APIExample/Podfile @@ -1,6 +1,8 @@ +source 'https://download.agora.io/cocoapods/' +source 'https://cdn.cocoapods.org/' + platform :ios, '12.0' -#source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' def common_pods # pod 'AgoraRtcEngine_iOS', '4.7.1' diff --git a/macOS/Podfile b/macOS/Podfile index 070eb4d5e..7de288ae2 100644 --- a/macOS/Podfile +++ b/macOS/Podfile @@ -1,3 +1,6 @@ +source 'https://download.agora.io/cocoapods/' +source 'https://cdn.cocoapods.org/' + macos_deployment_target = '12.0' platform :osx, macos_deployment_target