在Swift-Bridging-Header.h
内导入NUI窗格时出现问题。由于缺少依赖关系<NUIParse/NUIParse.h>
,无法构建NUI模块。
NUIParse
添加到Podfile
中,但事实并非如此
救命。 pod install
无济于事问题似乎是<NUIParse/NUIParse.h>
Pod模块中NUI
的非模块导入,如何避免这个问题?
Podfile
的一部分,其中NUI
已定义:
pod'NUI',:git =&gt; '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