Skip to content

Instantly share code, notes, and snippets.

@ponkore
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ponkore/8957238 to your computer and use it in GitHub Desktop.
Save ponkore/8957238 to your computer and use it in GitHub Desktop.
CocoaPods 導入メモ
  1. gem の最新化 ===============

    bash$ sudo gem update --system Updating rubygems-update Fetching: rubygems-update-2.2.2.gem (100%) Successfully installed rubygems-update-2.2.2 Parsing documentation for rubygems-update-2.2.2 Installing ri documentation for rubygems-update-2.2.2 Installing darkfish documentation for rubygems-update-2.2.2 Installing RubyGems 2.2.2 RubyGems 2.2.2 installed Parsing documentation for rubygems-2.2.2 Installing ri documentation for rubygems-2.2.2

ここで gems の ChangeLog みたいなやつが表示される。

RubyGems installed the following executables:
	/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/gem

Ruby Interactive (ri) documentation was installed. ri is kind of like man 
pages for ruby libraries. You may access it like this:
  ri Classname
  ri Classname.class_method
  ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.

RubyGems system software updated
bash$ 
  1. CocoaPods のインストール =========================== gem でインストールする。

    $ sudo gem install cocoapods Fetching: fuzzy_match-2.0.4.gem (100%) Successfully installed fuzzy_match-2.0.4 Fetching: json_pure-1.8.1.gem (100%) Successfully installed json_pure-1.8.1 Fetching: nap-0.6.0.gem (100%) Successfully installed nap-0.6.0 Fetching: multi_json-1.8.4.gem (100%) Successfully installed multi_json-1.8.4 Fetching: i18n-0.6.9.gem (100%) Successfully installed i18n-0.6.9 Fetching: activesupport-3.2.16.gem (100%) Successfully installed activesupport-3.2.16 Fetching: cocoapods-core-0.29.0.gem (100%) Successfully installed cocoapods-core-0.29.0 Fetching: claide-0.4.0.gem (100%) Successfully installed claide-0.4.0 Fetching: cocoapods-downloader-0.3.0.gem (100%) Successfully installed cocoapods-downloader-0.3.0 Fetching: colored-1.2.gem (100%) Successfully installed colored-1.2 Fetching: rake-10.1.1.gem (100%) rake's executable "rake" conflicts with /usr/bin/rake Overwrite the executable? [yN] N ERROR: Error installing cocoapods: "rake" from rake conflicts with /usr/bin/rake bash$ sudo gem install cocoapods rake's executable "rake" conflicts with /usr/bin/rake Overwrite the executable? [yN] y Successfully installed rake-10.1.1 Fetching: xcodeproj-0.14.1.gem (100%) Building native extensions. This could take a while... [!] You are using the prebuilt binary version of the xcodeproj gem. Successfully installed xcodeproj-0.14.1 Fetching: cocoapods-try-release-fix-0.1.1.gem (100%) Successfully installed cocoapods-try-release-fix-0.1.1 Fetching: escape-0.0.4.gem (100%) Successfully installed escape-0.0.4 Fetching: open4-1.3.0.gem (100%) Successfully installed open4-1.3.0 Fetching: cocoapods-0.29.0.gem (100%)

    CHANGELOG:

ここで 0.29.0 の ChangeLog が表示される。

Successfully installed cocoapods-0.29.0
Parsing documentation for cocoapods-0.29.0
Installing ri documentation for cocoapods-0.29.0
Parsing documentation for cocoapods-try-release-fix-0.1.1
Installing ri documentation for cocoapods-try-release-fix-0.1.1
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for open4-1.3.0
Installing ri documentation for open4-1.3.0
Parsing documentation for rake-10.1.1
Installing ri documentation for rake-10.1.1
Parsing documentation for xcodeproj-0.14.1
Installing ri documentation for xcodeproj-0.14.1
6 gems installed

bash$ 
  1. pod setup の実行 ===================

時間計測はしていないが、これには時間がかかった。

bash$ pod setup
Setting up CocoaPods master repo
Setup completed (read-only access)
bash$ 
  1. 試しに AFNetworking を入れてみる ===================================

    bash$ cd work/iOS-dev/HelloWorld bash$ cat > Podfile platform :ios, '7.0' pod "AFNetworking", "~> 2.0" ^D bash$ pod install Analyzing dependencies Downloading dependencies Installing AFNetworking (2.1.0) Generating Pods project Integrating client project

    [!] From now on use HelloWorld.xcworkspace. [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. bash$ ls -aCF ls -aCF ./ .git/ HelloWorld.xcworkspace/ Podfile.lock ../ HelloWorld/ HelloWorldTests/ Pods/ .DS_Store HelloWorld.xcodeproj/ Podfile bash$ open HelloWorld.xcworkspace

open コマンドで Xcode が起動し、xcworkspace を開く。

  1. gems 最新化時の log ===================== RD形式なので markdown とはちょっと表記が違う...

=== 2.2.1 / 2014-01-06

Bug fixes:

  • Platforms in the Gemfile.lock GEM section are now handled correctly. Bug #767 by Diego Viola.
  • RubyGems now displays which gem couldn't be uninstalled from the home directory. Pull request #757 by Michal Papis.
  • Removed unused method Gem::Resolver#find_conflict_state. Pull request #759 by Smit Shah.
  • Fixed installing gems from local files without dependencies. Issue #760 by Arash Mousavi, pull request #764 by Tim Moore.
  • Removed TODO about syntax that works in Ruby 1.8.7. Pull request #765 by Benjamin Fleischer.
  • Switched Gem.ruby_api_version to use RbConfig::CONFIG['ruby_version'] which has the same value but is overridable by packagers through --with-ruby-version= when configuring ruby. Bug #770 by Jeremy Evans.
  • RubyGems now prefers the bundler API for gem install to reduce HTTP requests. (This change was intended for RubyGems 2.2.0 but was missed.) This should address bug #762 by Dan Peterson and bug #766 by mipearson.
  • Added Gem::BasicSpecification#source_paths so documentation or analysis tools can work properly as require_paths no longer returns extension source directories. Bug #758 Vít Ondruch.
  • Gem.read_binary can read read-only files again. This caused file:// repositories to stop working. Bug #761 by John Anderson.
  • Fixed specification file sorting for Ruby 1.8.7 compatibility. Pull request #763 by James Mead

=== 2.2.0 / 2013-12-26

Special thanks to Vít Ondruch and Michal Papis for testing and finding bugs in RubyGems as it was prepared for the 2.2.0 release.

Major enhancements:

  • RubyGems can check for gem dependencies files (gem.deps.rb or Gemfile) when rubygems executables are started and uses the found dependencies. This means rake will work similar to bundle exec rake. To enable this set the RUBYGEMS_GEMDEPS environment variable to the location of your dependencies file.

    See Gem::use_gemdeps for further details.

  • A RubyGems directory may now be shared amongst multiple ruby versions. Upon activation RubyGems will automatically compile missing extensions for the current platform when the built objects are missing. Issue #596 by Michal Papis

    By default different platforms do not share gem install locations so this must be configured by setting GEM_HOME to a common directory. Some gems use fixed paths for requiring extensions and are not compatible with sharing gem directories.

    The default sharing location may be configured by RubyGems packagers through Gem.default_ext_dir_for. Pull Request #744 by Vít Ondruch.

Minor enhancements:

  • RubyGems checks the 'allowed_push_host' metadata value when pushing a gem to prevent an accidental push to a public repository (such as rubygems.org). If you have private gems you should set this value in your gem specification metadata. Pull request #603 by Seamus Abshere.
  • gem list now shows results for multiple arguments. Pull request #604 by Zach Rabinovich.
  • gem pristine --extensions will restore only gems with extensions. Issue #619 by Postmodern.
  • Gem::Specification#files is now sorted. Pull request #612 by Justin George.
  • For gem list and friends, "LOCAL" and "REMOTE" headers are omitted if only local or remote gem information is requested with --quiet. Pull request #615 by Michal Papis.
  • Added Gem::Specification#full_require_paths which is like require_paths, but returns a fully-qualified results. Pull request #632 by Vít Ondruch.
  • RubyGems now looks for the https_proxy environment variable for https:// sources. RubyGems will fall back to http_proxy if there is no https_proxy. Issue #610 by mkristian.
  • RubyGems now creates directories in .gem files. Issue #631 by marksolaris.
  • RubyGems raises an exception when a specification includes its gem. Issue #623 by notEthan.
  • RubyGems now displays relevant release note information when updating RubyGems. Issue #647 by Trevor Wennblom.
  • Deprecated Gem::Installer::ExtensionBuildError in favor of Gem::Ext::BuildError. The old constant is an alias for the new constant.
  • When extensions are built the gem_make.out file is always written now, even on success. This will help with debugging bad builds that report success.
  • If a specification fails to validate RubyGems shows a link to the specification reference guide. Issue #656 by Markus Heiler.
  • When using gem install -g, RubyGems now detects the presence of an Isolate, Gemfile or gem.deps.rb file.
  • Added Gem::StubSpecification#stubbed? to help determine if a user should run gem pristine to speed up gem loading. Pull request #694 and #701 by Jon Leighton.
  • RubyGems now warns when a gem has a pessimistic version dependency that may be too strict.
  • RubyGems now warns when a gem has an open-ended dependency.
  • RubyGems now raises an exception when a dependency for a gem is defined twice.
  • Marked the license specification attribute as recommended. Pull request #713 by Benjamin Fleischer.
  • RubyGems uses io/console instead of stty when available. Pull request #740 by Nobuyoshi Nakada
  • Relaxed Gem.ruby tests for platforms that override where ruby lives. Pull Request #755 by strzibny.

Bug fixes:

  • RubyGems now returns an error status when any file given to gem which cannot be found. Ruby bug #9004 by Eugene Vilensky.
  • Fixed command escaping when building rake extensions. Pull request #721 by Dmitry Ratnikov.
  • Fixed uninstallation of gems when GEM_HOME is a relative directory. Issue #708 by Ryan Davis.
  • Default gems are now ignored by Gem::Validator#alien. Issue #717 by David Bahar.
  • Fixed typos in RubyGems. Pull requests #723, #725, #731 by Akira Matsuda, pull request #736 by Leo Gallucci, pull request #746 by DV Suresh.
  • RubyGems now holds exclusive locks on cached gem files to prevent incorrect updates. Pull Request #737 by Smit Shah
  • Improved speed of gem install --ignore-dependencies. Patch by Terence Lee.

  1. ChangeLog ============

0.29.0

CocoaPodsCocoaPods-corecocoapods-downloader

Breaking
  • The command podfile_info is now a plugin offered by CocoaPods. As a result, the command has been removed from CocoaPods.
    Joshua Kalpin #1589

  • JSON has been adopted as the format to store specifications. As a result the pod ipc spec command returns a JSON representation and the YAML specifications are not supported anymore. JSON specifications adopt the .podspec.json extension. Fabio Pelosin #1568

Enhancements
  • Introduced pod try the easiest way to test the example project of a pod.
    Fabio Pelosin #1568

  • Pod headers are now provided to the user target as a system header. This means that any warnings in a Pod's code will show under its target in Xcode's build navigator, and never under the user target.
    Swizzlr #1596

  • Support LZMA2 compressed tarballs in the downloader.
    Kyle Fuller cocoapods-downloader#5

  • Add Bazaar support for installing directly from a repo.
    Fred McCann #1632

  • The pod search <query> command now supports regular expressions for the query parameter when searching using the option --full.
    Florian Hanke #1643

  • Pod lib lint now accepts multiple podspecs in the same folder.
    kra Larivain/OpenTable #1635

  • The pod push command will now silently test the upcoming CocoaPods trunk service. The service is only tested when pushing to the master repo and the test doesn't affect the normal workflow.
    Fabio Pelosin

  • The pod search <query> command now supports searching on cocoapods.org when searching using the option --web. Options --ios and --osx are fully supported. Florian Hanke #1643

  • The pod search <query> command now supports multiword queries when using the --web option. Florian Hanke #1643

Bug Fixes
  • Fixed a bug which resulted in pod lib lint not being able to find the headers.
    Fabio Pelosin #1566

  • Fixed the developer frameworks search paths so that $(SDKROOT)/Developer/Library/Frameworks is used for iOS and $(DEVELOPER_LIBRARY_DIR)/Frameworks is used for OS X.
    Kevin Wales #1562

  • When updating the pod repos, repositories with unreachable remotes are now ignored. This fixes an issue with certain private repositories.
    Joshua Kalpin #1595 #1571

  • The linter will now display an error if a Pod's name contains whitespace.
    Joshua Kalpin Core#39 #1610

  • Having the silent flag enabled in the config will no longer cause issues with pod search. In addition, the flag --silent is no longer supported for the command.
    Joshua Kalpin #1627

  • The linter will now display an error if a framework ends with .framework (i.e. QuartzCore.framework).
    Joshua Kalpin #1331 Core#45

  • The linter will now display an error if a library ends with .a or .dylib (i.e. z.dylib). It will also display an error if it begins with lib (i.e. libxml).
    Joshua Kalpin Core#44

  • The ARCHS build setting can come back as an array when more than one architecture is specified.
    Carson McDonald #1628

  • Fixed all issues caused by /tmp being a symlink to /private/tmp. This affected mostly pod lib lint, causing it to fail when the Pod used prefix_header_* or when the pod headers imported headers using the namespaced syntax (e.g. #import <MyPod/Header.h>).
    kra Larivain/OpenTable #1514

  • Fixed an incorrect path being used in the example app Podfile generated by pod lib create. Eloy Durán cocoapods-try#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment