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

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

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

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

Q&A

2回答

2544閲覧

pod installできない

org

総合スコア6

Swift

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

0グッド

0クリップ

投稿2020/02/01 09:14

%pod installが実行できなくなってしまい、解決策をお教えいただけないでしょうか。
###実行手順
%cd アプリケーション
%pod init
%pod install

###Podfile

ruby

1# Uncomment the next line to define a global platform for your project 2platform :ios, '13.2' 3source 'https://github.com/CocoaPods/Specs.git' 4 5def install_pods 6 # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 7 use_frameworks! 8 9 10pod 'Firebase/Analytics' 11 12 13end 14 15target 'アプリ名' do 16 install_pods 17end 18 19target 'アプリ名Tests' do 20 install_pods 21end 22 23swift3_names = [ 24] 25 26swift4_names = [ 27 28] 29 30swift42_names = [ 31] 32 33post_install do |installer| 34 installer.pods_project.targets.each do |target| 35 target.build_configurations.each do |config| 36 if swift4_names.include? target.name 37 config.build_settings['SWIFT_VERSION'] = "4.0" 38 elsif swift42_names.include? target.name 39 config.build_settings['SWIFT_VERSION'] = "4.2" 40 elsif swift3_names.include? target.name 41 config.build_settings['SWIFT_VERSION'] = "3.0" 42 else 43 config.build_settings['SWIFT_VERSION'] = "5.0" 44 end 45 end 46 end 47end

###%pod install時のコマンドラインerror

Ignoring bcrypt-3.1.12 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.12 Ignoring bindex-0.7.0 because its extensions are not built. Try: gem pristine bindex --version 0.7.0 Ignoring bootsnap-1.4.4 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.4 Ignoring bootsnap-1.4.3 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.3 Ignoring byebug-11.0.1 because its extensions are not built. Try: gem pristine byebug --version 11.0.1 Ignoring childprocess-1.0.1 because its extensions are not built. Try: gem pristine childprocess --version 1.0.1 Ignoring executable-hooks-1.6.0 because its extensions are not built. Try: gem pristine executable-hooks --version 1.6.0 Ignoring ffi-1.11.1 because its extensions are not built. Try: gem pristine ffi --version 1.11.1 Ignoring ffi-1.10.0 because its extensions are not built. Try: gem pristine ffi --version 1.10.0 Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0 Ignoring msgpack-1.3.0 because its extensions are not built. Try: gem pristine msgpack --version 1.3.0 Ignoring msgpack-1.2.9 because its extensions are not built. Try: gem pristine msgpack --version 1.2.9 Ignoring mysql2-0.5.2 because its extensions are not built. Try: gem pristine mysql2 --version 0.5.2 Ignoring nio4r-2.3.1 because its extensions are not built. Try: gem pristine nio4r --version 2.3.1 Ignoring nio4r-1.2.1 because its extensions are not built. Try: gem pristine nio4r --version 1.2.1 Ignoring nokogiri-1.10.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.2 Ignoring puma-3.12.1 because its extensions are not built. Try: gem pristine puma --version 3.12.1 Ignoring sassc-2.0.1 because its extensions are not built. Try: gem pristine sassc --version 2.0.1 Ignoring sqlite3-1.4.1 because its extensions are not built. Try: gem pristine sqlite3 --version 1.4.1 Ignoring therubyracer-0.12.3 because its extensions are not built. Try: gem pristine therubyracer --version 0.12.3 Ignoring websocket-driver-0.7.1 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.1 Ignoring websocket-driver-0.7.0 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.0 Ignoring websocket-driver-0.6.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.6.5 Analyzing dependencies

###stack

stack

1 2 CocoaPods : 1.8.4 3 Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin19] 4 RubyGems : 2.5.1 5 Host : Mac OS X 10.15.2 (19C57) 6 Xcode : 11.3 (11C29) 7 Git : git version 2.22.0 8Ruby lib dir : /Users/ユーザー名/.rbenv/versions/2.3.0/lib 9Repositories : 10 11 Plugins 12 13cocoapods-deintegrate : 1.0.4 14cocoapods-plugins : 1.0.0 15cocoapods-search : 1.0.0 16cocoapods-stats : 1.1.0 17cocoapods-trunk : 1.4.1 18cocoapods-try : 1.1.0

###エラ〜内容
LoadError - dlopen(/Users/ユーザー名/.rbenv/versions/2.3.0/lib/ruby/2.3.0/x86_64-darwin19/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /Users/ユーザー名/.rbenv/versions/2.3.0/lib/ruby/2.3.0/x86_64-darwin19/openssl.bundle
Reason: image not found - /Users/ユーザー名/.rbenv/versions/2.3.0/lib/ruby/2.3.0/x86_64-darwin19/openssl.bundle

###実行したこと
%sudo gem uninstall cocoapods
で一旦、全削除
その後
%sudo gem install -n /usr/local/bin cocoapods
でinstall実行

###現状
% pod --version
で確認すると
1.8.4
が出力されます。

以上よろしくお願いいたします。

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

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

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

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

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

guest

回答2

0

platform :ios, '13.2'だったので必然的にSwift5.1以上になると思い削除していただいたのですがダメでしたか、、

急にできなくなったということでしょうか?
Targetの追加など行っておりますでしょうか、、?

また、firebaseではなく別のライブラリで行ってみてどうなるかも試していただきたいです。
(firebaseのライブラリが対応していない可能性も考えて)

投稿2020/02/03 09:18

h_crane

総合スコア171

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

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

org

2020/02/03 10:15

早急なご返信ありがとうございます。 以前制作していたアプリケーションではできたという意味しでした。 念のため、そのアプリでも試したところ同じエラーが出ました。 pod 'SVProgressHUD' で試してみましたが、エラー吐きました。 一度同じようなエラーが起こった時にxcodeのuninstallと再インストールを実行したのが起因している可能性はありますでしょうか、、
org

2020/02/04 01:22

返信遅くなってしまい申し訳ございません。 ありがとうございます。 早急に取り組んでみますm(_ _)m
org

2020/02/04 09:27

頂いたURLに従い、 %sudo gem update cocoapods を実行後 %pod setup を行い、iosプロジェクトに移動後 %sudo rm -fr Pods/ %pod update を行いましたが、依然解決できませんでした。、 ちなみに、<sudo gem update cocoapods>では、以下が出力されます NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/ユーザー名/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/specifications/escape-0.0.4.gemspec:18. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/ユーザー名/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/specifications/fuzzy_match-2.0.4.gemspec:17. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/ユーザー名/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/specifications/i18n-0.9.5.gemspec:17. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/ユーザー名/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/specifications/escape-0.0.4.gemspec:18. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/ユーザー名/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/specifications/fuzzy_match-2.0.4.gemspec:17. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/ユーザー名/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/specifications/i18n-0.9.5.gemspec:17. Updating installed gems Nothing to update
org

2020/02/04 09:28

また、 <pod setup>では以下が出力されます。 Ignoring bcrypt-3.1.12 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.12 Ignoring bindex-0.7.0 because its extensions are not built. Try: gem pristine bindex --version 0.7.0 Ignoring bootsnap-1.4.4 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.4 Ignoring bootsnap-1.4.3 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.3 Ignoring byebug-11.0.1 because its extensions are not built. Try: gem pristine byebug --version 11.0.1 Ignoring childprocess-1.0.1 because its extensions are not built. Try: gem pristine childprocess --version 1.0.1 Ignoring executable-hooks-1.6.0 because its extensions are not built. Try: gem pristine executable-hooks --version 1.6.0 Ignoring ffi-1.11.1 because its extensions are not built. Try: gem pristine ffi --version 1.11.1 Ignoring ffi-1.10.0 because its extensions are not built. Try: gem pristine ffi --version 1.10.0 Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0 Ignoring msgpack-1.3.0 because its extensions are not built. Try: gem pristine msgpack --version 1.3.0 Ignoring msgpack-1.2.9 because its extensions are not built. Try: gem pristine msgpack --version 1.2.9 Ignoring mysql2-0.5.2 because its extensions are not built. Try: gem pristine mysql2 --version 0.5.2 Ignoring nio4r-2.3.1 because its extensions are not built. Try: gem pristine nio4r --version 2.3.1 Ignoring nio4r-1.2.1 because its extensions are not built. Try: gem pristine nio4r --version 1.2.1 Ignoring nokogiri-1.10.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.2 Ignoring puma-3.12.1 because its extensions are not built. Try: gem pristine puma --version 3.12.1 Ignoring sassc-2.0.1 because its extensions are not built. Try: gem pristine sassc --version 2.0.1 Ignoring sqlite3-1.4.1 because its extensions are not built. Try: gem pristine sqlite3 --version 1.4.1 Ignoring therubyracer-0.12.3 because its extensions are not built. Try: gem pristine therubyracer --version 0.12.3 Ignoring websocket-driver-0.7.1 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.1 Ignoring websocket-driver-0.7.0 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.0 Ignoring websocket-driver-0.6.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.6.5
guest

0

この部分は必要なのでしょうか?

swift3_names = [ ] swift4_names = [ ] swift42_names = [ ] post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if swift4_names.include? target.name config.build_settings['SWIFT_VERSION'] = "4.0" elsif swift42_names.include? target.name config.build_settings['SWIFT_VERSION'] = "4.2" elsif swift3_names.include? target.name config.build_settings['SWIFT_VERSION'] = "3.0" else config.build_settings['SWIFT_VERSION'] = "5.0" end end end end

ないのであれば消して、再度コマンドを入れてみてください

投稿2020/02/03 08:07

h_crane

総合スコア171

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

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

org

2020/02/03 08:35

ご回答ありがとうございます。 バージョンごとにインストールする為のテンプレートとしておいておりました。 削除後 %pod install コマンド試しましたが、エラー内容変わらずでした。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問