Cordova iOS - 新的Xcode配置/ CDVViewController.h找不到 [英] Cordova iOS - New Xcode Configuration / CDVViewController.h Not Found

查看:886
本文介绍了Cordova iOS - 新的Xcode配置/ CDVViewController.h找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当为Cordova项目创建新配置时,我收到一个Cordova / CDVViewController.h文件未找到构建错误。我尝试添加$(OBJROOT)/ UninstalledProducts / $(PLATFORM_NAME)/ include到项目Header搜索路径,建议在许多论坛,没有运气。



'm using:




  • Cordova 3.4.1

  • Xcode 7.2.1



重现步骤:


  1. 创建一个新的Cordova项目

  2. 添加ios平台

  3. 打开Xcode项目

  4. 运行项目以验证其是否构建并正常工作

  5. 转到项目构建设置,通过复制Debug,我调用我的DEV来创建新配置

  6. 编辑默认方案以使用新配置

  7. 再次执行专案

  8. Kaboom! - 找不到Codorva / CDVViewController.h档案

感谢您提供任何协助。

解决方案

我有同样的问题了几个星期。现在我找到了答案此处



如果要通过复制例如调试来添加新配置,以便能够更改某些构建设置,请向 CordovaLib 子项目添加相同的配置。您必须确保 CordovaLib 子项目具有与主项目相同的配置集。否则Cordova项目的构建文件夹与主项目的构建文件夹不同。因此无法找到像CDVViewController.h这样的文件。


  1. 选择CordovaLib子项目


  2. 选择信息标签

  3. 展开配置

添加与主项目相同的配置集:


  1. 点击+按钮

  2. 根据需要选择重复发布配置或调试配置

  3. 提供正确的配置名称。


  4. 在主要项目设置中添加$(OBJROOT)/ UninstalledProducts / $(PLATFORM_NAME)/ include项目标题搜索路径仅解决归档版本构建的问题。


    I get a 'Cordova/CDVViewController.h' file not found build error when creating a new configuration for a Cordova project. I did try adding "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" to the project Header Search Paths as suggested in many forums, no luck.

    I'm using:

    • Cordova 3.4.1
    • Xcode 7.2.1

    Steps to reproduce:

    1. Create a new Cordova project
    2. Add ios platform
    3. Open Xcode project
    4. Run project just to verify it builds and works
    5. Go to project build settings and create a new configuration by duplicating "Debug", I called mine "DEV"
    6. Edit the default scheme to use the new configuration for Run, Test, Profile, Debug, Release
    7. Run the project again
    8. Kaboom! - 'Codorva/CDVViewController.h' file not found

    Thanks in advance for any help.

    解决方案

    I had the same problem for a couple of weeks. Now I found the answer here

    If you want to add a new configuration by duplicating for example "Debug" to be able to change some build setting, you have to add the same configuration to the CordovaLib sub-project. You have to make sure that the CordovaLib sub-project has the same set of configurations as your main project. Otherwise the build folder for the Cordova Project is different than the build folder of the main project. Thus files like CDVViewController.h can not be found.

    1. Select CordovaLib sub-project
    2. Click on the project icon (above the Targets)
    3. Select Info tab
    4. Expand Configurations

    Add the same set of configurations as in the main project:

    1. Click + button
    2. Select Duplicate "Release" Configuration or "Debug" Configuration, depending on your needs
    3. Give the right name for configuration. Copy-paste it from main project settings.

    Adding "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" to the project Header Search Paths only solves issues with archiving release builds.

    这篇关于Cordova iOS - 新的Xcode配置/ CDVViewController.h找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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