Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
460 views
in Technique[技术] by (71.8m points)

ios - Cordova app failing to Archive with Xcode 7.1 (Cordova/CDVViewController.h file not found)

I've recently updated my Xcode to version 7.1 (from 7.0.1) and my Cordova app is failing to Archive with the error that says:

'Cordova/CDVViewController.h' file not found

in MainViewController.h file.

Searching through solutions on StackOverflow and elsewhere suggests that setting the project's Header Search Path from "$(OBJROOT)/UninstalledProducts/include"to "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" seems to solve the issue for a lot of people. However, this did not resolve the issue for me.

Is there anything that could be amiss? I never encountered a problem like this prior to updating Xcode.

Associated screenshot: Notice the Header Search Paths for both Debug and Release

UPDATE: It seems like updating my Mac OS X to El Capitan might have fixed this problem as I no longer get it. At the time of posting this question, I was on Yosemite. Hope this helps anyone encountering the same issue

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is the solution!

Add this line to your Build Settings -> Header Search Paths:

"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...