Header is not found during archiving a Cordova app ('WebRTC/RTCAudioSource.h' not found)

543 Views Asked by At

I've been trying to figure out this issue for a couple of days, but still have no luck.

I have a legacy application based on Ionic v1, Cordova 9 and cordova-ios 6.

We use cordova-plugin-iosrtc for calling feature, and until recently, it was the older version developed by eFace2Face. After facing some issues with microphone permissions, we decided to upgrade to the latest version and it did its work, however now I'm facing the following error when trying to archive (Product -> Archive) the app and upload it to AppStore:

<Path to app>/Plugins/cordova-plugin-iosrtc/cordova-plugin-iosrtc-Bridging-Header.h:8:9: 'WebRTC/RTCAudioSource.h' file not found

If I select simple Build (Product -> Build) everything works as expected.

Here are some details:

  1. cordova-plugin-iosrtc adds `cordova-plugin-iosrtc-Briding-Header.h which imports all WebRTC/* headers and comes with WebRTC.xcframework with all those WebRTC/ headers inside.
  2. The WebRTC framework is included with the main app target.
  3. In build section, Header Search Paths option explicitly includes the paths to the headers for both Debug and Release configurations. I double-checked and altered them dozens of times and couldn't get them work.
  4. I created a brand new project with cordova-plugin-iosrtc which achieved ok and tried to compare all the possible options, but had no luck.

Since, I'm not an iOS developer at all, maybe someone could suggest what else could be preventing the build from finding the headers?

1

There are 1 best solutions below

0
On BEST ANSWER

For me, the error was thrown not from the main application, but from app extensions which did not include WebRTC.xcframework in the build. I just created a separate Briding-Header-Extensions.h where I did not include WebRTC/* headers, updated Build settings -> SWIFT_OBJC_BRIDGING_HEADER path and it successfully archived.