Debug version of WebRTC library gives "Undefined symbols for architecture arm64"

I need to produce a debug version of WebRTC so I can try and track down an ipv6 issue.

I followed the instructions here: https://github.com/react-native-webrtc/react-native-webrtc/blob/master/Documentation/BuildingWebRTC.md

checked out the M92 branch of WebRTC and built the debug version of the library with the following:

python build-webrtc.py --setup --ios /my/directory/
cd /my/directory/build_webrtc/webrtc/ios/src/
git checkout -b build-M92 refs/remotes/branch-heads/4515
cd /tools/directory
python build-webrtc.py --sync --ios /my/directory/
python build-webrtc.py --build --ios --debug /my/directory/

This seemed to work although I did notice a few warnings were produced during that process:

Running cmd: gn gen out/Debug-ios-x64 --args=‘treat_warnings_as_errors=false is_component_build=false rtc_libvpx_build_vp9=true is_debug=true target_cpu=“x64” enable_dsyms=true rtc_enable_objc_symbol_export=true rtc_include_tests=false enable_ios_bitcode=true ios_deployment_target=“11.0” ios_enable_code_signing=false target_os=“ios” use_xcode_clang=true’
WARNING at the command-line “–args”:1:162: Build argument has no effect.
treat_warnings_as_errors=false is_component_build=false rtc_libvpx_build_vp9=true is_debug=true target_cpu=“x64” enable_dsyms=true rtc_enable_objc_symbol_export=true rtc_include_tests=false enable_ios_bitcode=true ios_deployment_target=“11.0” ios_enable_code_signing=false target_os=“ios” use_xcode_clang=true
^—
The variable “rtc_enable_objc_symbol_export” was set as a build argument
but never appeared in a declare_args() block in any buildfile.

To view all possible args, run “gn args --list <out_dir>”

The build continued as if that argument was unspecified.

I then replaced the original WebRTC.xcframework in react-native-webrtc/apple with the new debug version of the WebRTC.xcframework in build_webrtc/build/ios/

I cleaned the build but when I try and recompile the app I now get undefined symbols:

Undefined symbols for architecture arm64:
OBJC_CLASS$_RTCMediaConstraints”, referenced from:
objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCPeerConnection.o)
OBJC_CLASS$_RTCDataBuffer”, referenced from:
objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCDataChannel.o)
OBJC_CLASS$_RTCMediaStreamTrack”, referenced from:
_OBJC$CATEGORY_RTCMediaStreamTrack$_React in libreact-native-webrtc.a(RTCMediaStreamTrack+React.o)
OBJC_CLASS$_RTCDataChannelConfiguration”, referenced from:
objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)
OBJC_CLASS$_RTCSessionDescription”, referenced from:
objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)
objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCPeerConnection.o)
OBJC_CLASS$_RTCCameraVideoCapturer”, referenced from:
objc-class-ref in libreact-native-webrtc.a(VideoCaptureController.o)
objc-class-ref in libreact-native-webrtc.a(WebRTCModule+RTCMediaStream.o)
“_kRTCFieldTrialEnabledValue”, referenced from:
-[WebRTCModule initWithEncoderFactory:decoderFactory:] in libreact-native-webrtc.a(WebRTCModule.o)
OBJC_CLASS$_RTCPeerConnection”, referenced from:
_OBJC$CATEGORY_RTCPeerConnection$_VideoTrackAdapter in libreact-native-webrtc.a(WebRTCModule+VideoTrackAdapter.o)
_OBJC$CATEGORY_RTCPeerConnection$_React in libreact-native-webrtc.a(WebRTCModule+RTCPeerConnection.o)
OBJC_CLASS$_RTCPeerConnectionFactory”, referenced from:
objc-class-ref in libreact-native-webrtc.a(WebRTCModule.o)
OBJC_CLASS$_RTCDefaultVideoDecoderFactory”, referenced from:
objc-class-ref in libreact-native-webrtc.a(WebRTCModule.o)
“_RTCInitFieldTrialDictionary”, referenced from:
-[WebRTCModule initWithEncoderFactory:decoderFactory:] in libreact-native-webrtc.a(WebRTCModule.o)
OBJC_CLASS$_RTCEAGLVideoView”, referenced from:
objc-class-ref in libreact-native-webrtc.a(RTCVideoViewManager.o)
OBJC_METACLASS$_RTCVideoCapturer”, referenced from:
OBJC_METACLASS$_ScreenCapturer in libreact-native-webrtc.a(ScreenCapturer.o)
OBJC_CLASS$_RTCVideoFrame”, referenced from:
objc-class-ref in libreact-native-webrtc.a(ScreenCapturer.o)
OBJC_CLASS$_RTCConfiguration”, referenced from:
objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)
OBJC_CLASS$_RTCIceServer”, referenced from:
objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)
OBJC_CLASS$_RTCIceCandidate”, referenced from:
objc-class-ref in libreact-native-webrtc.a(RCTConvert+WebRTC.o)
OBJC_CLASS$_RTCCVPixelBuffer”, referenced from:
objc-class-ref in libreact-native-webrtc.a(ScreenCapturer.o)
OBJC_CLASS$_RTCVideoCapturer”, referenced from:
OBJC_CLASS$_ScreenCapturer in libreact-native-webrtc.a(ScreenCapturer.o)
OBJC_CLASS$_RTCDefaultVideoEncoderFactory”, referenced from:
objc-class-ref in libreact-native-webrtc.a(WebRTCModule.o)
ld: symbol(s) not found for architecture arm64

There is an ios-arm64 folder in the debug WebRTC.xcframework.

Does anyone know what I am doing wrong when building the debug library as clearly something is not set up right?

Thanks, Simon.