Firebase admobをやってみようと思った。

超初心者向け【cocoapods】の始め方。 | iPhoneアプリ備忘録
【CocoaPods】Podfileの書き方が変わっていた。 | iPhoneアプリ備忘録



$ sudo gem update --system


$ sudo gem update --system
Updating rubygems-update
Fetching: rubygems-update-3.0.2.gem (100%)
Successfully installed rubygems-update-3.0.2
Parsing documentation for rubygems-update-3.0.2
Installing ri documentation for rubygems-update-3.0.2
Installing darkfish documentation for rubygems-update-3.0.2
Done installing documentation for rubygems-update after 77 seconds
Parsing documentation for rubygems-update-3.0.2
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.0.2
ERROR:  While executing gem ... (Errno::EPERM)
    Operation not permitted @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/gem

gem updateでエラーが出た時の対処法 | ハックノート

$ sudo gem update --system -n /usr/local/bin
$ sudo gem install -n /usr/local/bin cocoapods


$  sudo gem install -n /usr/local/bin cocoapods



$  sudo gem install -n /usr/local/bin cocoapods
Fetching thread_safe-0.3.6.gem
Fetching activesupport-4.2.11.gem
Fetching concurrent-ruby-1.1.4.gem
Fetching i18n-0.9.5.gem
Fetching cocoapods-core-1.6.1.gem
Fetching cocoapods-deintegrate-1.0.3.gem
Fetching claide-1.0.2.gem
Fetching nap-1.1.0.gem
Fetching fuzzy_match-2.0.4.gem
Fetching cocoapods-downloader-1.2.2.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching tzinfo-1.2.5.gem
Fetching cocoapods-trunk-1.3.1.gem
Fetching cocoapods-stats-1.1.0.gem
Fetching cocoapods-search-1.0.0.gem
Fetching CFPropertyList-3.0.0.gem
Fetching netrc-0.11.0.gem
Fetching cocoapods-try-1.1.0.gem
Fetching nanaimo-0.2.6.gem
Fetching atomos-0.1.3.gem
Fetching gh_inspector-1.1.3.gem
Fetching xcodeproj-1.8.1.gem
Fetching escape-0.0.4.gem
Fetching fourflusher-2.2.0.gem
Fetching colored2-3.1.2.gem
Fetching molinillo-0.6.6.gem
Fetching ruby-macho-1.4.0.gem
Fetching cocoapods-1.6.1.gem
Successfully installed concurrent-ruby-1.1.4
Successfully installed i18n-0.9.5
Successfully installed thread_safe-0.3.6
Successfully installed tzinfo-1.2.5
Successfully installed activesupport-4.2.11
Successfully installed nap-1.1.0
Successfully installed fuzzy_match-2.0.4
Successfully installed cocoapods-core-1.6.1
Successfully installed claide-1.0.2
Successfully installed cocoapods-deintegrate-1.0.3
Successfully installed cocoapods-downloader-1.2.2
Successfully installed cocoapods-plugins-1.0.0
Successfully installed cocoapods-search-1.0.0
Successfully installed cocoapods-stats-1.1.0
Successfully installed netrc-0.11.0
Successfully installed cocoapods-trunk-1.3.1
Successfully installed cocoapods-try-1.1.0
Successfully installed molinillo-0.6.6
Successfully installed atomos-0.1.3
Successfully installed CFPropertyList-3.0.0
Successfully installed colored2-3.1.2
Successfully installed nanaimo-0.2.6
Successfully installed xcodeproj-1.8.1
Successfully installed escape-0.0.4
Successfully installed fourflusher-2.2.0
Successfully installed gh_inspector-1.1.3
Successfully installed ruby-macho-1.4.0
Successfully installed cocoapods-1.6.1
Parsing documentation for concurrent-ruby-1.1.4
Installing ri documentation for concurrent-ruby-1.1.4
Parsing documentation for i18n-0.9.5
Installing ri documentation for i18n-0.9.5
Parsing documentation for thread_safe-0.3.6
Installing ri documentation for thread_safe-0.3.6
Parsing documentation for tzinfo-1.2.5
Installing ri documentation for tzinfo-1.2.5
Parsing documentation for activesupport-4.2.11
Installing ri documentation for activesupport-4.2.11
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.6.1
Installing ri documentation for cocoapods-core-1.6.1
Parsing documentation for claide-1.0.2
Installing ri documentation for claide-1.0.2
Parsing documentation for cocoapods-deintegrate-1.0.3
Installing ri documentation for cocoapods-deintegrate-1.0.3
Parsing documentation for cocoapods-downloader-1.2.2
Installing ri documentation for cocoapods-downloader-1.2.2
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.1.0
Installing ri documentation for cocoapods-stats-1.1.0
Parsing documentation for netrc-0.11.0
Installing ri documentation for netrc-0.11.0
Parsing documentation for cocoapods-trunk-1.3.1
Installing ri documentation for cocoapods-trunk-1.3.1
Parsing documentation for cocoapods-try-1.1.0
Installing ri documentation for cocoapods-try-1.1.0
Parsing documentation for molinillo-0.6.6
Installing ri documentation for molinillo-0.6.6
Parsing documentation for atomos-0.1.3
Installing ri documentation for atomos-0.1.3
Parsing documentation for CFPropertyList-3.0.0
Installing ri documentation for CFPropertyList-3.0.0
Parsing documentation for colored2-3.1.2
Installing ri documentation for colored2-3.1.2
Parsing documentation for nanaimo-0.2.6
Installing ri documentation for nanaimo-0.2.6
Parsing documentation for xcodeproj-1.8.1
Installing ri documentation for xcodeproj-1.8.1
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for fourflusher-2.2.0
Installing ri documentation for fourflusher-2.2.0
Parsing documentation for gh_inspector-1.1.3
Installing ri documentation for gh_inspector-1.1.3
Parsing documentation for ruby-macho-1.4.0
Installing ri documentation for ruby-macho-1.4.0
Parsing documentation for cocoapods-1.6.1
Installing ri documentation for cocoapods-1.6.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, atomos, CFPropertyList, colored2, nanaimo, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods after 38 seconds
28 gems installed



$ pod setup


$ pod setup
Setting up CocoaPods master repo
  $ /usr/bin/git -C /Users/ユーザー名/.cocoapods/repos/master fetch origin
  remote: Enumerating objects: 104182, done.        
  remote: Counting objects: 100% (104182/104182), done.        
  remote: Compressing objects: 100% (175/175), done.        
  remote: Total 1890451 (delta 104040), reused 104078 (delta 103999), pack-reused 1786269        
  Receiving objects: 100% (1890451/1890451), 253.22 MiB | 3.26 MiB/s, done.
  Resolving deltas: 100% (1278869/1278869), completed with 10144 local objects.
  From https://github.com/CocoaPods/Specs
     a964d6c397f..417810a7461 master                -> origin/master
   * [new branch]            backz                 -> origin/backz
   * [new branch]            cdn_scripts           -> origin/cdn_scripts
   * [new branch]            swift_version_support -> origin/swift_version_support
  $ /usr/bin/git -C /Users/ユーザー名/.cocoapods/repos/master rev-parse
  --abbrev-ref HEAD
  $ /usr/bin/git -C /Users/ユーザー名/.cocoapods/repos/master reset --hard
  Checking out files: 100% (186163/186163), done.
  HEAD is now at 417810a7461 [Add] Geth 1.9.0-unstable.17859
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your diff.renameLimit variable to at least 183753 and retry the command.

CocoaPods 1.7.0.beta.1 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.7.0.beta.1

Setup completed


スクリーンショット 2019-03-02 16.56.22

ターミナルで、$ cd と書いたあとにProjectのフォルダをドラッグアンドドロップする。


$ pod init



# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'admobFireBaseTest' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks

  # Pods for admobFireBaseTest

  target 'admobFireBaseTestTests' do
    inherit! :search_paths
    # Pods for testing

  target 'admobFireBaseTestUITests' do
    inherit! :search_paths
    # Pods for testing



メールアドレスが公開されることはありません。 * が付いている欄は必須項目です