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

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

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

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Swift

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

Q&A

解決済

1回答

617閲覧

Firebaseを利用してAdMobをCocoaPodsを使って設定中pod initでエラー

Tomzy

総合スコア104

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Swift

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

0グッド

0クリップ

投稿2017/10/20 02:21

###Swift4で作ったアプリにAdMobの広告を登載すべく作業中にpod initでエラー
インターネット上の情報「[iPhone] アプリにAdMob広告を貼る(Firebase)」 https://i-app-tec.com/ios/admob.html#1 に載っている「Firebaseを利用したAdMobをCocoaPodsを使って設定」をベースに下記の手順でなんとか進んでいたのですが、取り込んだXcodeのPodfileの内容を書き換えて、ターミナル上  pod init を実行したら下記のエラーがでて行き詰まりました。

###ターミナル上のエラー内容
```/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface/error_report.rb:111:in strip': invalid byte sequence in UTF-8 (ArgumentError) from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface/error_report.rb:111:in markdown_podfile'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface/error_report.rb:30:in report' from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:66:in report_error'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:396:in handle_exception' from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:337:in rescue in run'

###作業の手順 * Googleアカウントを用意 * AdMobのアカウント作成 * AdMobのログイン * 新しい広告ユニットの制作(バナー広告の選択) * アプリ広告ユニットIDの取得(コピー) * Firebaseを利用したAdMobをCocoaPodsを使ってFirebaseの設定 * 新規FirebaseのAdMob IDを取得 * Xcodeプロジェクトを作成 * Bundle Identifierの記録(あとでコピーペーストする) * Command Line Toolsのインストール * Homebrewのインストール * Ruby の install * CocoaPodsの設定 ###cocoapodsのインストールは下記のとおり成功しています ```Successfully installed cocoapods-1.3.1 Parsing documentation for cocoapods-1.3.1 Done installing documentation for cocoapods after 2 seconds 1 gem installed

###質問:
ターミナルについては初心者でなんとか見様見真似で操作しています。Rubyについては全く知らず、指示どおりターミナルに打ち込んでいますが皆目見当がつきません。下記質問します、よろしくお願いします。
0. 上記のエラーは初心者でも乗り越えられる程度のものでしょうか。Rubyについて勉強せねば「Firebaseを利用したAdMobをCocoaPodsを使って設定」は無理と考えるべきでしょうか。
0. cocoapodsのインストールができているので、このまま進めたいと思いますが上記エラーの回避方法はあるでしょうか。
0. CocoaPodsを使えないケースの「Firebaseを利用したAdMobをSDKで設定」で進めた方がよいでしょうか。「AdMobをCocoaPodsを使って設定」との違いはどのようにでてくるのでしょうか。
0. 「Firebaseを利用したAdMobをSDKで設定」では「Objective-CのヘッダーファイルとそれをSwiftで読めるように以下の2つをprojectに追加Firebase.h
module.modulemap」という項目がありますが、Xcode 9.0 (9A235)Swift4
でもこの操作は必要でしょうか。

###ご参考事項

  • 環境は下記のとおりです。

MacBook Pro (15-inch, 2016)
High Sierra OS10.13
Xcode 9.0 (9A235)Swift4

  • [iPhone] CocoaPods を導入、rubyを設定をする

https://i-app-tec.com/ios/cocoapods-ruby.html
ではpathの設定のところで、上手くいきませんでしたが、最後のXcodeのフォルダ内にPodfileは生じていました。

  • Podfile内は文字化けした文字が並んでいましたが、下記のテキストに書き換えはできました。
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' target 'AdMobTest03' do use_frameworks! pod 'Firebase/Core' pod 'Firebase/AdMob' end コード

よろしくお願いします。

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

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

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

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

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

simorgh3196

2017/10/20 03:30

`ターミナル上のエラー内容`の`from`で始まる行しか書いてありませんが,その前に出力されている行はありませんか?
Tomzy

2017/10/20 04:07

超長文なので最後のみ書きました。下記に全文コピーペーストします。(一部重複しているところはEditorで削除しました。)TomijinoMacBook-Pro:~ tomijisuzuki$ pod init -bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory TomijinoMacBook-Pro:~ tomijisuzuki$ ls Applications Downloads Music Creative Cloud Files Dropbox Pictures Desktop Library Public Documents Movies Sites TomijinoMacBook-Pro:~ tomijisuzuki$ cd~/Documents -bash: cd~/Documents: No such file or directory TomijinoMacBook-Pro:~ tomijisuzuki$ cd Documents/Xcode5/AdMobTest03 TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ pod init -bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ sudo gem install cocoapods Password: Fetching: concurrent-ruby-1.0.5.gem (100%) Successfully installed concurrent-ruby-1.0.5 Fetching: i18n-0.9.0.gem (100%) Successfully installed i18n-0.9.0 Fetching: thread_safe-0.3.6.gem (100%) Successfully installed thread_safe-0.3.6 Fetching: tzinfo-1.2.3.gem (100%) Successfully installed tzinfo-1.2.3 Fetching: activesupport-4.2.10.gem (100%) Successfully installed activesupport-4.2.10 Fetching: nap-1.1.0.gem (100%) Successfully installed nap-1.1.0 Fetching: fuzzy_match-2.0.4.gem (100%) Successfully installed fuzzy_match-2.0.4 Fetching: cocoapods-core-1.3.1.gem (100%) Successfully installed cocoapods-core-1.3.1 Fetching: claide-1.0.2.gem (100%) Successfully installed claide-1.0.2 Fetching: cocoapods-deintegrate-1.0.1.gem (100%) Successfully installed cocoapods-deintegrate-1.0.1 Fetching: cocoapods-downloader-1.1.3.gem (100%) Successfully installed cocoapods-downloader-1.1.3 Fetching: cocoapods-plugins-1.0.0.gem (100%) 4Successfully installed cocoapods-plugins-1.0.0 Fetching: cocoapods-search-1.0.0.gem (100%) Successfully installed cocoapods-search-1.0.0 Fetching: cocoapods-stats-1.0.0.gem (100%) Successfully installed cocoapods-stats-1.0.0 Fetching: netrc-0.11.0.gem (100%) Successfully installed netrc-0.11.0 Fetching: cocoapods-trunk-1.3.0.gem (100%) Successfully installed cocoapods-trunk-1.3.0 Fetching: cocoapods-try-1.1.0.gem (100%) Successfully installed cocoapods-try-1.1.0 Fetching: molinillo-0.5.7.gem (100%) Successfully installed molinillo-0.5.7 Fetching: CFPropertyList-2.3.5.gem (100%) Successfully installed CFPropertyList-2.3.5 Fetching: colored2-3.1.2.gem (100%) Successfully installed colored2-3.1.2 Fetching: nanaimo-0.2.3.gem (100%) Successfully installed nanaimo-0.2.3 Fetching: xcodeproj-1.5.2.gem (100%) Successfully installed xcodeproj-1.5.2 Fetching: escape-0.0.4.gem (100%) Successfully installed escape-0.0.4 Fetching: fourflusher-2.0.1.gem (100%) Successfully installed fourflusher-2.0.1 Fetching: gh_inspector-1.0.3.gem (100%) Successfully installed gh_inspector-1.0.3 Fetching: ruby-macho-1.1.0.gem (100%) Successfully installed ruby-macho-1.1.0 Fetching: cocoapods-1.3.1.gem (100%) Successfully installed cocoapods-1.3.1 Parsing documentation for concurrent-ruby-1.0.5 Installing ri documentation for concurrent-ruby-1.0.5 Parsing documentation for i18n-0.9.0 Installing ri documentation for i18n-0.9.0 Parsing documentation for thread_safe-0.3.6 Installing ri documentation for thread_safe-0.3.6 Parsing documentation for tzinfo-1.2.3 Installing ri documentation for tzinfo-1.2.3 Parsing documentation for activesupport-4.2.10 Installing ri documentation for activesupport-4.2.10 Parsing documentation for nap-1.1.0 Installing ri documentation for nap-1.1.0 Parsing documentation for fuzzy_match-2.0.4 Installing ri documentation for fuzzy_match-2.0.4 Parsing documentation for cocoapods-core-1.3.1 Installing ri documentation for cocoapods-core-1.3.1 Parsing documentation for claide-1.0.2 Installing ri documentation for claide-1.0.2 Parsing documentation for cocoapods-deintegrate-1.0.1 Installing ri documentation for cocoapods-deintegrate-1.0.1 Parsing documentation for cocoapods-downloader-1.1.3 Installing ri documentation for cocoapods-downloader-1.1.3 Parsing documentation for cocoapods-plugins-1.0.0 Installing ri documentation for cocoapods-plugins-1.0.0 Parsing documentation for cocoapods-search-1.0.0 Installing ri documentation for cocoapods-search-1.0.0 Parsing documentation for cocoapods-stats-1.0.0 Installing ri documentation for cocoapods-stats-1.0.0 Parsing documentation for netrc-0.11.0 Installing ri documentation for netrc-0.11.0 Parsing documentation for cocoapods-trunk-1.3.0 Installing ri documentation for cocoapods-trunk-1.3.0 Parsing documentation for cocoapods-try-1.1.0 Installing ri documentation for cocoapods-try-1.1.0 Parsing documentation for molinillo-0.5.7 Installing ri documentation for molinillo-0.5.7 Parsing documentation for CFPropertyList-2.3.5 Installing ri documentation for CFPropertyList-2.3.5 Parsing documentation for colored2-3.1.2 Installing ri documentation for colored2-3.1.2 Parsing documentation for nanaimo-0.2.3 Installing ri documentation for nanaimo-0.2.3 Parsing documentation for xcodeproj-1.5.2 Installing ri documentation for xcodeproj-1.5.2 Parsing documentation for escape-0.0.4 Installing ri documentation for escape-0.0.4 Parsing documentation for fourflusher-2.0.1 Installing ri documentation for fourflusher-2.0.1 Parsing documentation for gh_inspector-1.0.3 Installing ri documentation for gh_inspector-1.0.3 Parsing documentation for ruby-macho-1.1.0 Installing ri documentation for ruby-macho-1.1.0 Parsing documentation for cocoapods-1.3.1 Installing ri documentation for cocoapods-1.3.1 Done installing documentation for concurrent-ruby, i18n, thread_safe, tzinfo, activesupport, nap, fuzzy_match, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-stats, netrc, cocoapods-trunk, cocoapods-try, molinillo, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 21 seconds 27 gems installed TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ 23608864 -bash: 23608864: command not found TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ pod init TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ sudo gem update Updating installed gems Updating activesupport Fetching: activesupport-5.1.4.gem (100%) Successfully installed activesupport-5.1.4 Parsing documentation for activesupport-5.1.4 Installing ri documentation for activesupport-5.1.4 Installing darkfish documentation for activesupport-5.1.4 Done installing documentation for activesupport after 6 seconds Parsing documentation for activesupport-5.1.4 Done installing documentation for activesupport after 2 seconds Updating bigdecimal Fetching: bigdecimal-1.3.2.gem (100%) Building native extensions. This could take a while... Successfully installed bigdecimal-1.3.2 Parsing documentation for bigdecimal-1.3.2 Installing ri documentation for bigdecimal-1.3.2 Installing darkfish documentation for bigdecimal-1.3.2 Done installing documentation for bigdecimal after 1 seconds Parsing documentation for bigdecimal-1.3.2 Done installing documentation for bigdecimal after 0 seconds Updating did_you_mean Fetching: did_you_mean-1.1.2.gem (100%) ERROR: Error installing did_you_mean: did_you_mean requires Ruby version >= 2.4.0. Updating fuzzy_match Fetching: fuzzy_match-2.1.0.gem (100%) Successfully installed fuzzy_match-2.1.0 Parsing documentation for fuzzy_match-2.1.0 Installing ri documentation for fuzzy_match-2.1.0 Installing darkfish documentation for fuzzy_match-2.1.0 Done installing documentation for fuzzy_match after 0 seconds Parsing documentation for fuzzy_match-2.1.0 Done installing documentation for fuzzy_match after 0 seconds Updating io-console Fetching: io-console-0.4.6.gem (100%) Building native extensions. This could take a while... Successfully installed io-console-0.4.6 Parsing documentation for io-console-0.4.6 Installing ri documentation for io-console-0.4.6 Installing darkfish documentation for io-console-0.4.6 Done installing documentation for io-console after 0 seconds Parsing documentation for io-console-0.4.6 Done installing documentation for io-console after 0 seconds Updating json Fetching: json-2.1.0.gem (100%) Building native extensions. This could take a while... Successfully installed json-2.1.0 Parsing documentation for json-2.1.0 Installing ri documentation for json-2.1.0 Installing darkfish documentation for json-2.1.0 (eval):7: warning: circular argument reference - max_nesting (eval):64: warning: circular argument reference - match_string (eval):64: warning: circular argument reference - match_string Done installing documentation for json after 1 seconds Parsing documentation for json-2.1.0 Done installing documentation for json after 0 seconds Updating libxml-ruby Fetching: libxml-ruby-3.0.0.gem (100%) Building native extensions. This could take a while... ERROR: Error installing libxml-ruby: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/libxml-ruby-3.0.0/ext/libxml /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20171019-33966-qyykqq.rb extconf.rb checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME) --with-xml2-config --without-xml2-config --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --withou
Tomzy

2017/10/20 04:11

字数制限か途中で切れています。詳細チェック中です。
Tomzy

2017/10/20 04:14

上記より下記が続きます。--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME) --with-xml2-config --without-xml2-config --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib extconf failure: need libxml2. Install the library or try one of the following options to extconf.rb: --with-xml2-config=/path/to/xml2-config --with-xml2-dir=/path/to/libxml2 --with-xml2-lib=/path/to/libxml2/lib --with-xml2-include=/path/to/libxml2/include To see why this extension failed to compile, please check the mkmf.log which can be found here: /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/libxml-ruby-3.0.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/libxml-ruby-3.0.0 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/libxml-ruby-3.0.0/gem_make.out Updating minitest Fetching: minitest-5.10.3.gem (100%) Successfully installed minitest-5.10.3 Parsing documentation for minitest-5.10.3 Installing ri documentation for minitest-5.10.3 Installing darkfish documentation for minitest-5.10.3 Done installing documentation for minitest after 1 seconds Parsing documentation for minitest-5.10.3 Done installing documentation for minitest after 0 seconds Updating molinillo Fetching: molinillo-0.6.3.gem (100%) Successfully installed molinillo-0.6.3 Parsing documentation for molinillo-0.6.3 Installing ri documentation for molinillo-0.6.3 Installing darkfish documentation for molinillo-0.6.3 Done installing documentation for molinillo after 0 seconds Parsing documentation for molinillo-0.6.3 Done installing documentation for molinillo after 0 seconds Updating nokogiri Fetching: mini_portile2-2.3.0.gem (100%) Successfully installed mini_portile2-2.3.0 Fetching: nokogiri-1.8.1.gem (100%) Building native extensions. This could take a while... Successfully installed nokogiri-1.8.1 Parsing documentation for mini_portile2-2.3.0 Installing ri documentation for mini_portile2-2.3.0 Installing darkfish documentation for mini_portile2-2.3.0 Parsing documentation for nokogiri-1.8.1 Installing ri documentation for nokogiri-1.8.1 Installing darkfish documentation for nokogiri-1.8.1 Done installing documentation for mini_portile2, nokogiri after 12 seconds Parsing documentation for mini_portile2-2.3.0 Parsing documentation for nokogiri-1.8.1 Done installing documentation for mini_portile2, nokogiri after 1 seconds Updating power_assert Fetching: power_assert-1.1.0.gem (100%) Successfully installed power_assert-1.1.0 Parsing documentation for power_assert-1.1.0 Installing ri documentation for power_assert-1.1.0 Installing darkfish documentation for power_assert-1.1.0 Done installing documentation for power_assert after 0 seconds Parsing documentation for power_assert-1.1.0 Done installing documentation for power_assert after 0 seconds Updating psych Fetching: psych-2.2.4.gem (100%) Building native extensions. This could take a while... Successfully installed psych-2.2.4 Parsing documentation for psych-2.2.4 Installing ri documentation for psych-2.2.4 Installing darkfish documentation for psych-2.2.4 Done installing documentation for psych after 1 seconds Parsing documentation for psych-2.2.4 Done installing documentation for psych after 0 seconds Updating rake Fetching: rake-12.1.0.gem (100%) Successfully installed rake-12.1.0 Parsing documentation for rake-12.1.0 Installing ri documentation for rake-12.1.0 Installing darkfish documentation for rake-12.1.0 Done installing documentation for rake after 1 seconds Parsing documentation for rake-12.1.0 Done installing documentation for rake after 0 seconds Updating rdoc Fetching: rdoc-5.1.0.gem (100%) Successfully installed rdoc-5.1.0 Parsing documentation for rdoc-5.1.0 Installing ri documentation for rdoc-5.1.0 Installing darkfish documentation for rdoc-5.1.0 (eval):3: warning: string literal in condition (eval):2: warning: string literal in condition Done installing documentation for rdoc after 10 seconds Parsing documentation for rdoc-5.1.0 Done installing documentation for rdoc after 5 seconds Updating sqlite3 Fetching: sqlite3-1.3.13.gem (100%) Building native extensions. This could take a while... Successfully installed sqlite3-1.3.13 Parsing documentation for sqlite3-1.3.13 Installing ri documentation for sqlite3-1.3.13 Installing darkfish documentation for sqlite3-1.3.13 Done installing documentation for sqlite3 after 1 seconds Parsing documentation for sqlite3-1.3.13 Done installing documentation for sqlite3 after 0 seconds Updating test-unit Fetching: test-unit-3.2.6.gem (100%) Successfully installed test-unit-3.2.6 Parsing documentation for test-unit-3.2.6 Installing ri documentation for test-unit-3.2.6 Installing darkfish documentation for test-unit-3.2.6 Done installing documentation for test-unit after 2 seconds Parsing documentation for test-unit-3.2.6 Done installing documentation for test-unit after 1 seconds Gems updated: activesupport bigdecimal did_you_mean fuzzy_match io-console json libxml-ruby minitest molinillo mini_portile2 nokogiri power_assert psych rake rdoc sqlite3 test-unit TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ sudo gem install cocoapods Successfully installed cocoapods-1.3.1 Parsing documentation for cocoapods-1.3.1 Done installing documentation for cocoapods after 2 seconds 1 gem installed TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ==> This script will install: /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew /usr/local/Homebrew ==> The following existing directories will be made group writable: /usr/local/bin ==> The following existing directories will have their owner set to tomijisuzuki: /usr/local/bin ==> The following existing directories will have their group set to admin: /usr/local/bin ==> The following new directories will be created: /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var Press RETURN to continue or any other key to abort ==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin Password: ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin ==> /usr/bin/sudo /usr/sbin/chown tomijisuzuki /usr/local/bin ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin ==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var ==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions ==> /usr/bin/sudo /usr/sbin/chown tomijisuzuki /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var ==> /usr/bin/sudo /bin/mkdir -p /Users/tomijisuzuki/Library/Caches/Homebrew ==> /usr/bin/sudo /bin/chmod g+rwx /Users/tomijisuzuki/Library/Caches/Homebrew ==> /usr/bin/sudo /usr/sbin/chown tomijisuzuki /Users/tomijisuzuki/Library/Caches/Homebrew ==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew ==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew ==> /usr/bin/sudo /usr/sbin/chown tomijisuzuki /Library/Caches/Homebrew ==> Downloading and installing Homebrew... remote: Counting objects: 92465, done. remote: Compressing objects: 100% (3/3), done. remote: Total 92465 (delta 1), reused 1 (delta 0), pack-reused 92462 Receiving objects: 100% (92465/92465), 21.33 MiB | 5.55 MiB/s, done. Resolving deltas: 100% (67003/67003), done. From https://github.com/Homebrew/brew * [new branch] master -> origin/master * [new tag] 0.1 -> 0.1 * [new tag] 0.2 -> 0.2 一部略 * [new tag] 1.3.5 -> 1.3.5 * [new tag] 1.3.6 -> 1.3.6 HEAD is now at 15096e728 Merge pull request #3279 from sjackman/pull ==> Tapping homebrew/core Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'... remote: Counting objects: 4605, done. remote: Compressing objects: 100% (4386/4386), done. remote: Total 4605 (delta 35), reused 343 (delta 11), pack-reused 0 Receiving objects: 100% (4605/4605), 3.83 MiB | 1.60 MiB/s, done. Resolving deltas: 100% (35/35), done. Tapped 4382 formulae (4,652 files, 11.9MB) ==> Cleaning up /Library/Caches/Homebrew... ==> Migrating /Library/Caches/Homebrew to /Users/tomijisuzuki/Library/Caches/Homebr ==> Deleting /Library/Caches/Homebrew... Already up-to-date. ==> Installation successful! ==> Homebrew has enabled anonymous aggregate user behaviour analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics.html ==> Next steps: - Run `brew help` to get started - Further documentation: https://docs.brew.sh TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue.
Tomzy

2017/10/20 04:21

更に続きます。 If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks! Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /opt/ImageMagick/bin/MagickCore-config /opt/ImageMagick/bin/MagickWand-config /opt/ImageMagick/bin/Magick++-config /opt/ImageMagick/bin/Wand-config /opt/ImageMagick/bin/Magick-config Warning: Your XQuartz (2.7.7) is outdated. Please install XQuartz 2.7.9 (or delete the current version). XQuartz can be updated using Homebrew-Cask by running brew cask reinstall xquartz TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ brew cask reinstall xquartz ==> Tapping caskroom/cask Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'... remote: Counting objects: 3856, done. remote: Compressing objects: 100% (3840/3840), done. remote: Total 3856 (delta 30), reused 551 (delta 12), pack-reused 0 Receiving objects: 100% (3856/3856), 1.32 MiB | 8.17 MiB/s, done. Resolving deltas: 100% (30/30), done. Tapped 0 formulae (3,865 files, 4.1MB) ==> Creating Caskroom at /usr/local/Caskroom ==> We'll set permissions properly so we won't need sudo in the future Password: ==> Satisfying dependencies ==> Downloading https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg ######################################################################## 100.0% ==> Verifying checksum for Cask xquartz ==> Installing Cask xquartz ==> Running installer for xquartz; your password may be necessary. ==> Package installers may write to any location; options such as --appdir are igno ==> installer: Package name is XQuartz 2.7.11 ==> installer: Installing at base path / ==> installer: The install was successful. ==> /Library/LaunchAgents/org.macosforge.xquartz.startx.plist: service already load ???? xquartz was successfully installed! TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ echo 'export PATH=/usr/local/bin:$PATH' export PATH=/usr/local/bin:$PATH TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ echo TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/ImageMagick/bin TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ echo 'export PATH=/usr/local/bin:$PATH' >> .bash_profile TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ source .bash_profile TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry and just ignore them. Thanks! Warning: "config" scripts exist outside your system or Homebrew directories. `./configure` scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking. Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /opt/ImageMagick/bin/MagickCore-config /opt/ImageMagick/bin/MagickWand-config /opt/ImageMagick/bin/Magick++-config /opt/ImageMagick/bin/Wand-config /opt/ImageMagick/bin/Magick-config TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ brew install ruby-build ==> Installing dependencies for ruby-build: autoconf, pkg-config, openssl ==> Installing ruby-build dependency: autoconf ==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.high_sierra.bott ######################################################################## 100.0% ==> Pouring autoconf-2.69.high_sierra.bottle.4.tar.gz ==> Caveats Emacs Lisp files have been installed to: /usr/local/share/emacs/site-lisp/autoconf ==> Summary ???? /usr/local/Cellar/autoconf/2.69: 71 files, 3.0MB ==> Installing ruby-build dependency: pkg-config ==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.high_sierra. ######################################################################## 100.0% ==> Pouring pkg-config-0.29.2.high_sierra.bottle.tar.gz ???? /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB ==> Installing ruby-build dependency: openssl ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2l.high_sierra.bot ######################################################################## 100.0% ==> Pouring openssl-1.0.2l.high_sierra.bottle.tar.gz ==> Caveats A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash This formula is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include For pkg-config to find this software you may need to set: PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig ==> Summary ???? /usr/local/Cellar/openssl/1.0.2l: 1,709 files, 12.3MB ==> Installing ruby-build ==> Downloading https://github.com/rbenv/ruby-build/archive/v20170914.tar.gz ==> Downloading from https://codeload.github.com/rbenv/ruby-build/tar.gz/v20170914 ######################################################################## 100.0% ==> ./install.sh ???? /usr/local/Cellar/ruby-build/20170914: 363 files, 187.2KB, built in 3 seconds TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ $ brew install rbenv -bash: $: command not found TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ brew install rbenv ==> Downloading https://homebrew.bintray.com/bottles/rbenv-1.1.1.high_sierra.bottle ######################################################################## 100.0% ==> Pouring rbenv-1.1.1.high_sierra.bottle.tar.gz ???? /usr/local/Cellar/rbenv/1.1.1: 36 files, 62.7KB TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' &gt;&gt; .bash_profile -bash: syntax error near unexpected token `&' TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ 1 -bash: 1: command not found TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ 2 -bash: 2: command not found TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ 3 -bash: 3: command not found TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' &gt;&gt;echo 'export PATH="$HOME/.rbenv/bin:$PATH"' &gt;&gt; .bash_profile -bash: syntax error near unexpected token `&' TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ echo 'eval "$(rbenv init -)"' &gt;&gt; .bash_profile -bash: syntax error near unexpected token `&' TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ source .bash_profile TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ ruby -v ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17] TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ sudo gem install cocoapods Password: Successfully installed cocoapods-1.3.1 Parsing documentation for cocoapods-1.3.1 Done installing documentation for cocoapods after 2 seconds 1 gem installed TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ pod init [!] Existing Podfile found in directory TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$ pod install /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface/error_report.rb:111:in `strip': invalid byte sequence in UTF-8 (ArgumentError) from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface/error_report.rb:111:in `markdown_podfile' from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/user_interface/error_report.rb:30:in `report' from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:66:in `report_error' from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:396:in `handle_exception' from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:337:in `rescue in run' from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:325:in `run' from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run' from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>' from /usr/local/bin/pod:22:in `load' from /usr/local/bin/pod:22:in `<main>' TomijinoMacBook-Pro:AdMobTest03 tomijisuzuki$
Tomzy

2017/10/20 04:24

以上で全文です。よろしくお願いします。
guest

回答1

0

ベストアンサー

上記のエラーは初心者でも乗り越えられる程度のものでしょうか

Rubyと言うより、Linux系のコマンドの使い方などを理解していれば割と分かるでしょう

cocoapodsのインストールができているので、このまま進めたいと思いますが

とりあえずAdMobが表示できるのかどうか確認してからおたずね頂いた方がいいのではと思います

CocoaPodsを使えないケース

「Firebaseを利用したAdMobをSDKで設定」では

AdMob広告を入れたいだけなら昔ながらのSDKでの方法でもいいような気がします

投稿2017/10/20 14:25

編集2017/10/20 14:26
aja

総合スコア3733

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

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

Tomzy

2017/10/21 02:56

ありがとうございました。まずはAdMobの表示に進んでみます。
Tomzy

2017/10/21 10:00

ありがとうございました。 URLの指示に従ってHeaderを含めたGoogleMobileAds.frameworkをインポートした(copyもクリックして)のですが、ViewControlerのimport GoogleMobileAdsのところにNo such module 'GoogleMobileAds'というエラーが発生して先に進みません。Frameworkも指示通りに入れて「Build Phases」タブの「Link Binary With Libraries」に上にもframe.workは表示されています。
Tomzy

2017/10/21 10:06

もう一度やりなおしましたらエラーは消えました。ただ、画面にはまだバナーがでていません。IDなどを精査して、また報告します。
Tomzy

2017/10/21 10:08

やはりIDにカッコをつけたままコピーペーストしていました。IDからカッコを外しましたら、バナーが表示されました。 ありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問