''ProjectModuleName-Swift.h' file not found for iOS Swift
I use both of Objctive-C and swift within a swift Framework.
I import the Xcode-generated header for my Swift code into any Objective-C .m file like <ProjectModuleName/ProjectModuleName-Swift.h> as Apple suggest.
It works for the framework project.
While when I want to add the framework project to an app target project with the pod ,:path script in the Podfile , it meets the error <ProjectModuleName/ProjectModuleName-Swift.h> file not found as follows.
/// Add the target framework from the Podfile
pod "ProjectModuleName",:path => '../ProjectModuleName_Path/'
If I change the <ProjectModuleName/ProjectModuleName-Swift.h> in the framework to ProjectModuleName-Swift.h. It will be fine for the app project ,but it does't work for the framework project.
/// It will be fine for the app project ,but it does't work for the framework project.
#import "ProjectModuleName-Swift.h"
/// It will be bad for the app project ,but it works for the framework project.
#import <ProjectModuleName/ProjectModuleName-Swift.h>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
