我有一个带有自定义插件的Ionic Cordova应用程序,在运行时我收到此错误:
/Users/brendanwinter/Desktop/ionic/platforms/ios/MyApp/Bridging-Header.h:31:9: error: 'ProjectSDK/ProjectSDK.h' file not found
#import <ProjectSDK/ProjectSDK.h>
^
<unknown>:0: error: failed to import bridging header '/Users/brendanwinter/Desktop/ionic/platforms/ios/MyApp/Bridging-Header.h'
似乎错误就在这里:
error: 'ProjectSDK/ProjectSDK.h' file not found
#import <ProjectSDK/ProjectSDK.h>
我正在使用
cordova-plugin-swift-support
插件ProjectSDK-Bridging-Header.h 文件包含:
#import <ProjectSDK/ProjectSDK.h>
plugin.xml 包含
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-projectsdkplugin" version="1.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>ProjectSDKPlugin</name>
<js-module name="ProjectSDKPlugin" src="www/ProjectSDKPlugin.js">
<clobbers target="projectsdk" />
</js-module>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="ProjectSDK">
<param name="ios-package" value="ProjectSDK" />
</feature>
</config-file>
<framework src="src/ios/ProjectSDK.framework" custom="true" />
<header-file src="src/ios/ProjectSDK-Bridging-Header.h" />
<source-file src="src/ios/ProjectSDK.swift" />
</platform>
</plugin>
它使用Xcode运行,但在运行ionic cordova run ios
时会出现上述错误。
Bridging Header从哪个目录中拉出来? 我已经尝试将框架放在与Bridging-Header和ProjectSDK-Bridging-Header相同的级别,但是不起作用。
谢谢!