将 NUI pod 导入内部时出现问题Swift-Bridging-Header.h
。由于缺少依赖项,无法构建 NUI 模块<NUIParse/NUIParse.h>
。
- 我什至尝试添加
NUIParse
到 中Podfile
,但它没有帮助。 pod install
也无济于事
<NUIParse/NUIParse.h>
问题似乎是Pod内部模块的非模块导入NUI
,如何避免该问题?
的一部分Podfile
,其中NUI
定义:
pod 'NUI', :git => ' https://github.com/peantunes/nui.git '
Xcode 控制台中的编译错误:
/Users/user/ReactProject/ios/ReactProject/Swift-Bridging-Header.h:7:9: note: while building module 'NUI' imported from /Users/user/ReactProject/ios/ReactProject/Swift-Bridging-Header.h:7:
#import <NUI/NUISettings.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/NUI-umbrella.h"
^
/Users/user/ReactProject/ios/build/Build/Products/Debug-iphonesimulator/NUI/NUI.framework/Headers/NUI-umbrella.h:13:9: note: in file included from /Users/user/ReactProject/ios/build/Build/Products/Debug-iphonesimulator/NUI/NUI.framework/Headers/NUI-umbrella.h:13:
#import "NUIDeclaration.h"
^
/Users/user/ReactProject/ios/build/Build/Products/Debug-iphonesimulator/NUI/NUI.framework/Headers/NUIDeclaration.h:10:9: error: 'NUIParse/NUIParse.h' file not found
#import "NUIParse/NUIParse.h"
^
/Users/user/ReactProject/ios/ReactProject/Swift-Bridging-Header.h:7:9: error: could not build module 'NUI'
#import <NUI/NUISettings.h>
^
<unknown>:0: error: failed to import bridging header '/Users/user/ReactProject/ios/ReactProject/Swift-Bridging-Header.h'
Swift-Bridging-Header.h
:
#import <NUI/NUISettings.h>
#import "AppDelegate.h"
NUIDeclaration.h
在NUI
模块内:
#import <NUIParse/NUIParse.h>
@interface NUIDeclaration : NSObject<NUIPParseResult>
@property (strong) NSString *property;
@property (strong) NSString *value;
@end