LoginSignup
7
5

More than 5 years have passed since last update.

Realm/RLMArray.h file not foundとCould not build Objective-C module 'Realm' でハマった

Last updated at Posted at 2016-07-06

きっかけ

cocoapodsのバージョンを1.0.0にしたら、「Realm/RLMArray.h file not found」と「Could not build Objective-C module 'Realm'」のエラーが出てハマりました。
cocoapodsのバージョンを0.39.0にすれば直るそうなのですが、自分の場合、以下の方法で解決しました。

バージョン情報

  • RealmSwift: 1.0.1
  • Xcode: 7.3.1
  • Cocoaods: 1.0.1
  • Swift: 2.2

対策方法

まず、ターミナルを開き、プロジェクトのあるフォルダまでいきます。

ターミナル
$pod cache clean Realm
$pod cache clean RealmSwift
$pod deintegrate || rm -rf Pods

してから

ターミナル
$pod install

次に、Xcodeを開き、メニューバーをoptionキーを押しながら[Product]->[Clean Build Folder...]とするとエラーが消えました。

最後に

Swift駆け出しの未熟者です。
指摘等があればご教授くださいm(__)m

参考

Realm/RLMArray.h file not found and Could not build Objective-C module 'Realm'
CocoaPods 1.0.0.beta.X can't integrate Realm as a dynamic framework

7
5
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
7
5