当在Xcode终端中运行时找不到'Cordova / CDVViewController.h'文件 [英] 'Cordova/CDVViewController.h' file not found when run in Xcode terminal

查看:1728
本文介绍了当在Xcode终端中运行时找不到'Cordova / CDVViewController.h'文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,当我试图从xcode终端构建我的代码是失败,并给我一个'Cordova / CDVViewController.h'文件的错误,但是当我从xcode构建这个,那么它正在构建正确。 / p>

在我的Xcode中,我做了整个Cordova子目录 Upgrade Cordova 。也当我跑列表。这是我在下面看到的:



xcodebuild -list



项目myProject的信息:

 目标:
myProject

构建配置:
Debug
发布

如果未指定构建配置并且未传递-scheme,则使用Release。

方案:
myProject
CordovaLib

环境:Xcode5,OS 10.8.5



有没有什么我缺少?我为什么这样做,因为我试图运行这通过jenkins的原因。我认为这是一个jenkins问题,但后来我得到它的xcode终端没有看到CordovaLib。

解决方案

花了太多的时间找出这个解决方案,所以这是一个耻辱不共享。可能有很多可能的原因为什么这个问题出现,但如果你觉得你已经设置了一切正确的CordovaLib(像我!),仍然有同样的问题。这可能是原因之一。发生了什么是当我运行

  xcodebuild -scheme myProject -configurationRelease

它正在构建成功,但如果你不提供-scheme它将失败,默认情况下它使用释放。该方案的参数将控制构建的目标以及如何构建它们,myProject方案包含子文件夹和对Cordovalib的引用。



现在,移动到Jenkins,需要在XCode插件的高级Xcode构建选项部分的Xcode模式文件文本框中提供该方案。



我的设置是Xcode作为我的从但是这可能仍然适用于任何Xcode和Jenkins组合 - 所以当我运行

  xcodebuild -list 

我收到以下讯息的讯息:

 如果未指定构建配置,并且未传递-scheme,则使用Release。 

此项目不包含任何计划。

这样的解决方案是,在xcode项目中,转到Product | Scheme | Manage Scheme 共享到项目myProject和CordovaLib。编译。办理登机手续(因为我从TFS抓取这个)。再次使用-list命令,您将看到您刚刚共享的方案。



希望这有助于!


So when I am trying to build my code from xcode terminal it is failing and giving me an error of 'Cordova/CDVViewController.h' file not found but when I am building this from xcode then it is building just fine.

In my Xcode, I've done the whole Cordova sub directory thing Upgrade Cordova. Also when I ran list. This is what I see below:

xcodebuild -list

Information about project "myProject":

Targets:
    myProject

Build Configurations:
    Debug
    Release

If no build configuration is specified and -scheme is not passed then "Release" is used.

Schemes:
    myProject
    CordovaLib

Environment: Xcode5, OS 10.8.5

Is there anything I am missing? The reason why I am doing this because I am trying to run this through jenkins. I thought it was a jenkins issue but then I got it down to the xcode terminal not seeing the CordovaLib.

解决方案

I've spent too much time figuring out the solution for this so it is a shame not to share. There can be many possible reasons why this problem arise but if you feel like you've set up everything right in the CordovaLib (like me!) and still has the same problem. This can be one of the causes. What's happening is when I ran the

 xcodebuild  -scheme myProject -configuration "Release"

it is building successfully, but if you don't supply "-scheme" it it will fail by default it is using the "Release". The parameters of the scheme will control which targets are built and how they are built, myProject scheme contains the subfolder and reference to Cordovalib.

Now, moving to Jenkins, is you need to supply the scheme in the "Xcode Schema File" text box in the Advanced Xcode build options section of the XCode Plugin.

My set-up is Xcode as my slave but this may still apply to whatever Xcode and Jenkins combination you have - so when I ran the

 xcodebuild  -list

I receive the message the following message:

If no build configuration is specified and -scheme is not passed then "Release" is used.

This project contains no schemes.

The solution for this is, in your xcode project, go to Product|Scheme|Manage Scheme and checked "Shared" to both projects myProject and CordovaLib. Compile. Check-in (because I am grabbing this from TFS). Ran again the "-list" command and you will see the schemes that you just shared.

Hope this helps!

这篇关于当在Xcode终端中运行时找不到'Cordova / CDVViewController.h'文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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