Greetings for the flutter webrtc ios library it seems that when ios is the intiatior of the connection it has a problem with setting the remote descriptiion even wehn the signaling state is correct
this is indeed correct for the caller the frame work still seems to throw the error, its fine when the ios device is the callee but not the caller
heres my code
// File: RTCPeerConnection.m
- (void)peerConnectionSetRemoteDescription:(RTCSessionDescription*)sdp
peerConnection:(RTCPeerConnection*)peerConnection
result:(FlutterResult)result {
// Log SDP
NSLog(@"Setting remote description with SDP: %@", sdp.sdp);
// Ensure this is called on the main thread
dispatch_async(dispatch_get_main_queue(), ^{
// Log signaling state before setting the remote description
NSLog(@"Signaling state before setting remote description: %ld", (long)peerConnection.signalingState);
[peerConnection setRemoteDescription:sdp completionHandler:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Failed to set remote description: %@", error.localizedDescription);
result([FlutterError errorWithCode:@"SetRemoteDescriptionFailed"
message:[NSString stringWithFormat:@"Error %@", error.localizedDescription]
details:nil]);
} else {
// Log signaling state after setting the remote description
NSString *stateString = [self stringForSignalingState:peerConnection.signalingState];
result(stateString);
}
}];
});
}
Greetings for the flutter webrtc ios library it seems that when ios is the intiatior of the connection it has a problem with setting the remote descriptiion even wehn the signaling state is correct
this is indeed correct for the caller the frame work still seems to throw the error, its fine when the ios device is the callee but not the caller heres my code
can this be fixed