[ENGDESK-38176] [Feature] Add forceRelayCandidate to Force TURN Relay and Prevent Local Network Permission Request on iOS #174
+97
−29
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.
[ENGDESK-38176][Feature]-Add forceRelayCandidate to Force TURN Relay and Prevent Local Network Permission Request on iOS
Description
This PR introduces a new configuration option to control ICE transport policy, allowing developers to manage whether the SDK triggers the local network access permission request on iOS 15 and 17. By default, WebRTC gathers ICE candidates from the local network, which can prompt a permission request.
To align with the JS SDK, we are adding the
forceRelayCandidate
configuration, which enables developers to enforce TURN relay and avoid local network access.Changes
iceTransportPolicy = .relay
.How it Works
Usage
forceRelayCandidate
inTxConfig
to customize ICE transport behavior.Example when using
![Screenshot 2025-02-11 at 1 56 37 PM](https://private-user-images.githubusercontent.com/4660743/412081307-6bb6c52e-73e5-442b-9f7a-b3a4ddd97e50.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTU3NTIsIm5iZiI6MTczOTI5NTQ1MiwicGF0aCI6Ii80NjYwNzQzLzQxMjA4MTMwNy02YmI2YzUyZS03M2U1LTQ0MmItOWY3YS1iM2E0ZGRkOTdlNTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTczNzMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTYwMWVhYjgyM2U2YzAzOTJhYzNhNDNiYzFhMGM5OTFlNzI1Mjc4ZTUyM2JkNDRmOTRkYjdlMzYxNDAxY2M1MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.mE9D2vcLsjye73D6FN5aOBmXGyE8gnlVyVX7xmX8ihg)
forceRelayCandidate: true
Example when using
![Screenshot 2025-02-11 at 1 57 45 PM](https://private-user-images.githubusercontent.com/4660743/412081530-290a73ac-67d0-43ad-aba4-e803c3ad6afe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTU3NTIsIm5iZiI6MTczOTI5NTQ1MiwicGF0aCI6Ii80NjYwNzQzLzQxMjA4MTUzMC0yOTBhNzNhYy02N2QwLTQzYWQtYWJhNC1lODAzYzNhZDZhZmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMTczNzMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODZmMDc2MTc5MGJhMjIxNTUyYmQ3MzMwMDkwYzBhMjc0ODM2NmMxYTgxMzhjNGVjMTQ1OTE3MzIyNTM0Zjk5YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.B9hAruEYJivnrtZKy5wdbm-9fCEdRgT69EGE0JAgp34)
forceRelayCandidate: false