diff --git a/.github/workflows/sample_test.yml b/.github/workflows/sample_test.yml index e3ad0f2f..ed52d53a 100644 --- a/.github/workflows/sample_test.yml +++ b/.github/workflows/sample_test.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Xcode version uses: maxim-lobanov/setup-xcode@v1.4.1 with: - xcode-version: '13.1' + xcode-version: '14.3.1' - name: Pack Library run: | npm pack diff --git a/CHANGELOG.md b/CHANGELOG.md index c80e3ca9..73d77758 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.27.6 (June 2024) + +- [Fix]: This version fixes some iOS crashes that were introduced in version 2.27.5. Fixes issue #757. + # 2.27.5 (June 2024) - [Fix]: This version fixes the `OTSubscriber captionReceived` event handler. It also fixes the `OTPublisher publishCaptions` option in iOS. diff --git a/ios/OpenTokReactNative/OTSessionManager.swift b/ios/OpenTokReactNative/OTSessionManager.swift index b9db9970..69b3ef4f 100644 --- a/ios/OpenTokReactNative/OTSessionManager.swift +++ b/ios/OpenTokReactNative/OTSessionManager.swift @@ -651,7 +651,7 @@ extension OTSessionManager: OTPublisherDelegate { let publisherId = Utils.getPublisherId(publisher as! OTPublisher); if (publisherId.count > 0) { OTRN.sharedState.isPublishing[publisherId] = true; - let streamInfo: Dictionary = EventUtils.prepareJSStreamEventData(stream); + var streamInfo: Dictionary = EventUtils.prepareJSStreamEventData(stream); streamInfo["publisherId"] = publisherId; self.emitEvent("publisherStreamCreated", data: streamInfo); setStreamObservers(stream: stream, isPublisherStream: true) @@ -667,7 +667,7 @@ extension OTSessionManager: OTPublisherDelegate { OTRN.sharedState.isPublishing[publisherId] = false; if (publisherId.count > 0) { OTRN.sharedState.isPublishing[publisherId] = false; - let streamInfo: Dictionary = EventUtils.prepareJSStreamEventData(stream); + var streamInfo: Dictionary = EventUtils.prepareJSStreamEventData(stream); streamInfo["publisherId"] = publisherId; self.emitEvent("publisherStreamDestroyed", data: streamInfo); } diff --git a/ios/OpenTokReactNative/Utils/EventUtils.swift b/ios/OpenTokReactNative/Utils/EventUtils.swift index ad4a2449..a516fb49 100644 --- a/ios/OpenTokReactNative/Utils/EventUtils.swift +++ b/ios/OpenTokReactNative/Utils/EventUtils.swift @@ -132,10 +132,8 @@ class EventUtils { "\(sessionPreface)connectionCreated", "\(sessionPreface)connectionDestroyed", "\(sessionPreface)didFailWithError", - "\(publisherPreface)streamCreated", "\(sessionPreface)signal", "\(sessionPreface)muteForced", - "\(publisherPreface)streamDestroyed", "\(publisherPreface)didFailWithError", "\(publisherPreface)audioLevelUpdated", "\(publisherPreface)rtcStatsReport", @@ -162,7 +160,9 @@ class EventUtils { "\(sessionPreface)sessionDidReconnect", "\(sessionPreface)streamPropertyChanged", "\(subscriberPreface)subscriberDidReconnect", - "\(subscriberPreface)subscriberCaptionReceived" + "\(subscriberPreface)subscriberCaptionReceived", + "publisherStreamCreated", + "publisherStreamDestroyed" ]; } diff --git a/package-lock.json b/package-lock.json index a7d00240..5f1a931f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "opentok-react-native", - "version": "2.27.5", + "version": "2.27.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "opentok-react-native", - "version": "2.27.5", + "version": "2.27.6", "license": "MIT", "dependencies": { "axios": "^1.6.8", diff --git a/package.json b/package.json index fe970081..1629a97a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opentok-react-native", - "version": "2.27.5", + "version": "2.27.6", "description": "React Native components for OpenTok iOS and Android SDKs", "main": "src/index.js", "homepage": "https://www.tokbox.com",