0

I am developing a new feature for a react native module (https://github.com/blackuy/react-native-twilio-video-webrtc) the thing is it is developed in Objective-C and I need to import a new Swift class.

What I've done so far:

  1. Importing it with the name of the package, in this case #import <RNTwilioVideoWebRTC/RNTwilioVideoWebRTC-Swift.h>
  2. Ensuring that Precompile Bridging Header is set to Yes
  3. Setting Objective-C Generated Interface Header Name as RNTwilioVideoWebRTC-Swift.h

The problem is then i try to run the example app inside the module, it prompts an error RNTwilioVideoWebRTC/RNTwilioVideoWebRTC-Swift.h file not found

What am I missing? Thanks!

1 Answers1

0

There are a few things to make sure that:

  1. Check whether the bridging file is available in your project or not. If available, make sure that you have imported YourProductName-Swift.h in your bridge file. And if not, please create a bridge file.
  2. Mark the class & methods with @objc to make them accessible in your Objective C code.

You can follow this answer for reference.

Rahul
  • 404
  • 4
  • 8