Warning: Undefined array key 1 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 12
Warning: Undefined array key 2 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 15
Warning: Undefined array key 3 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 18
Warning: Undefined array key 4 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 21
Warning: Undefined array key 1 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 24
Warning: Undefined array key 2 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 27
Warning: Undefined array key 3 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 30
Warning: Undefined array key 4 in /home/naoooooo8/naoya-ono.com/public_html/swift/wp-content/themes/sango-theme-poripu/library/functions/prp_content.php on line 33
ここでは、CocoaPodsを使ったRealmのインストール手順について紹介します。
CocoaPodsの導入方法については、以下の記事を参考にしてください。
【Swift】CocoaPodsの導入手順とライブラリのインストール方法
Realmインストール手順
まずは、プロジェクトを作成したらターミナルで、プロジェクトのディレクトリに移動し、次のコマンドでPodfileファイルを作成します。
pod init
ファイルができたら、テキストエディタで開いて、次のコードを追加します。
pod 'RealmSwift'
ファイルを保存し、インストールします。
pod install
正常にインストールが完了すると、次のように「Pod installation compelete!」と表示されます。

はい、以上で完了です。
これで、対象のプロジェクトでRealmが使えるようになります。



