LoginSignup
0
0

More than 5 years have passed since last update.

Realmインストール時にsharedApplicationでエラーが発生した際の対応

Posted at

事象

Realm 0.98.7をCocoaPodsでインストールしたところ、コード内の

[Application sharedApplication]

にて

'sharedApplication' is unavailable: Use view controller based solutions where appropriate instead.

といったエラーが発生し、ビルドが通らなくなった。

原因

CocoaPodsのバージョンが古かった。(RealmはCocoaPods 3.9.0以上が必要)

解決方法

  1. CocoaPodsのアップデートを行う。
$ sudo gem update cocoapods

2.RealmをPodfileから削除

3.下記を実行してRealmをプロジェクトから削除

$ pod install

4.RealmをPodfileに再度追加

5.下記を実行

$ pod install
0
0
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
0
0