LoginSignup
20
20

More than 5 years have passed since last update.

Xcode 7.1でCDVViewController.h が File not found と言われた

Last updated at Posted at 2015-10-26

10/22にXcode 7.1がリリースされて、早速更新しちゃっていたわけけですが…。
既存プロジェクトがビルドできなくなるとビックリするよね。。。
ということで、そんなお話し。

Xcode 7.1でcordovaプロジェクトをArchive

Xcodeを7.1にしたらcordovaのプロジェクトでArchiveしようとすると

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

MainViewController.h で

#import <Cordova/CDVViewController.h>

が見つからない(file not found)と言われるようになった。

原因

ファイルが見つからない…と出ているので、そのものズバリ見つからないらしい。

‘Cordova/CDVViewController.h’ file not found in Xcode 7.1 beta
探してみると、beta時代の話しではあるが同様の現象があった。

Build Settings > Header Search Pathの値が

"$(TARGET_BUILD_DIR)/usr/local/lib/include"
"$(OBJROOT)/UninstalledProducts/include"
"$(BUILT_PRODUCTS_DIR)"

となっているので、これを

"$(TARGET_BUILD_DIR)/usr/local/lib/include"
-"$(OBJROOT)/UninstalledProducts/include"
+"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"
"$(BUILT_PRODUCTS_DIR)"

とすることで、アーカイブできるようになるということで、早速やってみたところ、、、できた。

ReleaseもDebugも両方同じにしてしまってOKそう。
(Debugに関しては、変更しなくてもデバッグ出来ていたけど一応。)

ちなみに、TARGETの方に設定するとPROJECTの設定を個別に上書きした形になるのでTARGETSの方ではなくPROJECTの方で設定しました。

20
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
20