Xcode 7.2无法导入桥接标头 [英] Xcode 7.2 Failed to import bridging header

查看:90
本文介绍了Xcode 7.2无法导入桥接标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新的配置(重复调试),它显示错误无法导入桥接头。但是调试配置正在编译并且可以正常运行。以下是详细信息

I have a new configuration(Duplicate of debug) which is showing the error "Failed to import bridging header". But the debug configuration is compiling and running without fail. Following are the details


  • Xcode 7.2

  • iOS SDK 9.2

  • 科尔多瓦在目标C中的插入

  • 本机应用程序代码迅速2.x

  • 一个目标

  • 三种配置调试,测试(重复调试)和发布。

  • Xcode 7.2
  • iOS SDK 9.2
  • Cordova pluggins in Objective C
  • Native application code is swift 2.x
  • One target
  • Three configurations debug,test(duplicate of debug) and release.

在Debug / Release配置中构建项目时,没有错误并正在运行

While building the project in Debug/Release configuration no errors and running the app in simulator without any issue.

当我构建配置TestDebug(重复调试)或TestRelease(重复发布)时,有两个错误

When I build configurations TestDebug(duplicate of Debug) or TestRelease(duplicate of Release) there are two errors


/ Users / .... / MainViewController.h:11:9:找不到'Cordova / CDVViewController.h'文件

/Users/ ..../MainViewController.h:11:9: 'Cordova/CDVViewController.h' file not found

无法导入桥接标头'/ Users /......./ Example4-Bridging-Header.h'

Failed to import bridging header '/Users/......./Example4-Bridging-Header.h'


推荐答案

您需要将这些配置(TestDebug,TestRelease)以及
添加到Cordova项目中,否则,您的主项目将进入TestRelease和TestRelease的文件夹,但在其中找不到Cordova构建结果
默认情况下,Cordova将构建结果放入Debug-iphoneos和Release-iphoneos

You need to add these Configurations (TestDebug, TestRelease) to the Cordova project as well Otherwise your main project will look in the folders for TestRelease and TestRelease but won't find the Cordova build results there By Default Cordova puts build result in Debug-iphoneos and Release-iphoneos

I当我向项目添加自定义发行版时遇到了类似的问题。
对我来说,它在构建时起作用,但归档失败。
将自定义发行版添加到Cordova有助于

I had a similar issue when I added a custom Distribution to my project. For me it worked when building, but failed at archiving. Adding the custom Distribution to Cordova helped

在清理并构建之后,您应该会看到Cordova lib并包含在TestDebug-iphoneos或TestRelease-iphoneos中,而不是在Release-iphoneos或Debug-iphoneos(我想现在它已经为您添加了它)

After a clean and build you should see the Cordova lib and include in TestDebug-iphoneos or TestRelease-iphoneos and not in Release-iphoneos or Debug-iphoneos( where I guess it adds it now for you)

这篇关于Xcode 7.2无法导入桥接标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆