HomeiOS Developmentios - Can not discover generated -Swift.h file from native pod

ios – Can not discover generated -Swift.h file from native pod


I’m making a Turbo Module for React Native. The TM depends upon one other pod that I’ve created domestically. I am getting a compilation error stating that my generated -Swift.h header file is lacking.

Heres the setup:

I’ve an area pod (lets name it “MyLocalPod”) that’s written in Swift. It’s supposed to make use of this pod with Goal-C code from my Turbo Module, so I’ve positioned @objc attributes to the related public code within the pod. I’ve additionally up to date some structs to be class objects that extends NSObject as nicely.

I’ve a React Native Turbo Module package deal setup with an instance RN challenge included. The TM package deal’s podspec makes use of the above native pod like so:

s.dependency "MyLocalPod"

Now I do know you can not add an area growth pod to a podspec file so I used a workaround from this reply https://stackoverflow.com/a/49422999/10820594. My instance app’s Podfile is like the next:

pod 'MyLocalPod', :path => '/Customers/dev/Tasks/MyLocalPod'

In my Goal-C (.mm file) supply code for the TM I import my native pod like:

#import <MyLocalPod/MyLocalPod-Swift.h>

However I all the time get a compilation error after I run npm run ios that claims deadly error: 'MyLocalPod/MyLocalPod-Swift.h' file not discovered. The MyLocalPod-Umbrella.h file is discovered, however not the -Swift.h file.

I’ve tried a number of issues:

  1. Cleaned the product construct, manually deleted DerivedData, and deleted Pods folder and Podfile.lock earlier than utterly re-adding the TM, codegen, and pod set up a number of occasions (and in several orders)
  2. I manually constructed MyLocalPod earlier than doing pod set up within the instance app
  3. Discovered the generated MyLocalPod-Swift.h header file deep in DerivedData and added its path to HEADER_SEARCH_PATHS in XCode
  4. Set Outlined Modules to YES in MyLocalPod‘s goal’s Construct Settings

Every attainable repair by no means discovered the generated -Swift.h file.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments