LoginSignup
2
1

More than 3 years have passed since last update.

Objective-C Bridging Headerファイルを編集したら大量のビルドエラーが出る時の対処

Posted at

なにが起きたか

Objective-C Bridging Headerファイル(Objective-C-Bridging-Header.hとか)を編集した後にビルドしたら大量のビルドエラーが発生した:innocent:
Objective-C_Bridge_Header_Change.png

対処

  • エラーが出てるファイルにimport UIKit を追記する
    無理でしょ…

  • Objective-C Bridging Headerファイルに#import <UIKit/UIKit.h>を追記する
    NSObjectなどのエラーが出ている場合は #import <Foundation/Foundation.h>を追記する

参考

https://stackoverflow.com/questions/26116288/failed-to-import-bridging-header
UIKitとかFoundationがなくても、ライブラリが機能するようにということらしい。

2
1
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
2
1