0

Using Swift in Your iOS Native Modules: https://reactnative.dev/docs/next/the-new-architecture/turbo-modules-with-swift

When following this tutorial to write TurboModules in Swift, the following compilation error occurs:

DerivedSources/AppName-Swift.h:330:34 Cannot find interface declaration for 'RCTDefaultReactNativeFactoryDelegate', superclass of 'ReactNativeDelegate'

(Note: 'AppName' is your app’s name.)

2 Answers 2

1

To insert #import "RCTDefaultReactNativeFactoryDelegate.h" before #import "AppName-Swift.h", you can modify your Objective-C file like this:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

Add #import "RCTAppDelegate.h" to your Objective-C bridging header file, this solved the problem for me

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.