質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Realm

RealmとはSQLiteやCore Dataに代わるモバイルデータベースです。iOSとAndroidの両方でサポートされています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

Q&A

解決済

1回答

1833閲覧

Realmをインストールしたい

a_summer_days

総合スコア6

Realm

RealmとはSQLiteやCore Dataに代わるモバイルデータベースです。iOSとAndroidの両方でサポートされています。

Swift

Swiftは、アップルのiOSおよびOS Xのためのプログラミング言語で、Objective-CやObjective-C++と共存することが意図されています

0グッド

1クリップ

投稿2020/08/19 05:59

SwiftでRealmを使用したい

CocoaPodsやRealm,いくつかの説明サイトを見てRealmをRealmTestというswiftのプロジェクトにインストールしようと"pod install"を実行したのですが、以下のようなエラーが毎回発生し、先に進めません。

発生している問題・エラーメッセージ

PC:RealmTest ユーザ$ pod install Analyzing dependencies Downloading dependencies Installing Realm (5.3.4) [!] Error installing Realm [!] /Users/ー/.pyenv/shims/git clone https://github.com/realm/realm-cocoa.git /var/folders/94/q28zfm314dj73063lmbxwd0h0000gn/T/d20200819-97532-100o4fb --template= --single-branch --depth 1 --branch v5.3.4 pyenv: git: command not found The `git' command exists in these Python versions: anaconda3-4.0.0/envs/opencv_conda Note: See 'pyenv help global' for tips on allowing both python2 and python3 to be found. [!] Automatically assigning platform `iOS` with version `13.6` on target `RealmTest` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`. MBP-TR:RealmTest tsujiryouhei$ pod repo update Updating spec repo `trunk` CocoaPods 1.10.0.beta.2 is available. To update use: `sudo gem install cocoapods --pre` [!] This is a test version we'd love you to try. For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.10.0.beta.2

###Podfileの内容

use_frameworks! target 'RealmTest' do pod 'RealmSwift' end

試したこと

https://medium.com/@loooooovingyuki/swiftでrealm-databaseを使う-4c8b94524bf3
https://qiita.com/chan_naruwo/items/798e30d840bdca3edd8c
https://guides.cocoapods.org/syntax/podfile.html#platform
https://realm.io/docs/swift/latest
などのサイトの方法を試しました

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

gitがanacondaという別のソフト上でインストールされていたため、そっちのデータを削除し、新たにHomebrewを利用してgitを再インストールしたら解決できた。
ただ、

[!] Please close any current Xcode sessions and use `RealmTest.xcworkspace` for this project from now on. Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed. [!] Automatically assigning platform `iOS` with version `13.6` on target `RealmTest` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`. [!] The `RealmTestUITests [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-RealmTest-RealmTestUITests/Pods-RealmTest-RealmTestUITests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `RealmTestUITests [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-RealmTest-RealmTestUITests/Pods-RealmTest-RealmTestUITests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target.

という注意書きは消えなかった.

投稿2020/08/19 14:39

a_summer_days

総合スコア6

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問