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 struct
s 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:
- 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) - I manually constructed
MyLocalPod
earlier than doingpod set up
within the instance app - Discovered the generated
MyLocalPod-Swift.h
header file deep in DerivedData and added its path toHEADER_SEARCH_PATHS
in XCode - Set
Outlined Modules
toYES
inMyLocalPod
‘s goal’s Construct Settings
Every attainable repair by no means discovered the generated -Swift.h
file.