Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on pod install after CLONE VIA URL (Bitbucket) on different Mac #3562

Closed
grenmath opened this issue May 15, 2015 · 2 comments
Closed

Comments

@grenmath
Copy link

Hi,

i got issue about pod install. I cant do pod with this error:
The project is seprated by another project which it's for Static Library. And this project generate without problem Podspec. But when i switch to base project who use this static library, i cant do pod install.

Paths are correct. Example

/parentDir/Vanille/
/parentDir/VanilleUI/

Mac A use CocoaPod version 0.35 , work fine!
Mac B use CocoaPod version 0.37 , pod install dont work ! i just cloned this project to another Mac

Any idea ??

Command

/usr/bin/pod install

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

   CocoaPods : 0.37.0
        Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
    RubyGems : 2.0.14
        Host : Mac OS X 10.10.3 (14D136)
       Xcode : 6.3.1 (6D1002)
         Git : git version 2.3.2 (Apple Git-55)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 825a6e706e0f6fdb4581f5cec3fcc3513d93d0b8

Plugins

cocoapods-plugins : 0.4.2
cocoapods-trunk   : 0.6.0
cocoapods-try     : 0.4.3

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '7.0'

source 'https://github.com/CocoaPods/Specs.git'

pod 'Vanille', :path => '../Vanille'
pod 'SDWebImage', '~> 3.7'
pod 'MFSideMenu', '~> 0.5'
pod 'ADClusterMapView', '~> 1.1'
pod 'TransitionKit', '~> 2.0'
pod 'RestKit', '~> 0.22.0'

Error

NoMethodError - undefined method `new_file' for <PBXFileReference path=`Vanille` UUID=`C58CA4ADE5440C32401B88CD`>:Xcodeproj::Project::Object::PBXFileReference
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/project.rb:196:in `add_file_reference'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:168:in `block (2 levels) in add_file_accessors_paths_to_pods_group'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:166:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:166:in `block in add_file_accessors_paths_to_pods_group'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:162:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:162:in `add_file_accessors_paths_to_pods_group'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:103:in `block in add_resources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/user_interface.rb:110:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:102:in `add_resources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer/file_references_installer.rb:38:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer.rb:495:in `install_file_references'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer.rb:131:in `block in generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer.rb:129:in `generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/installer.rb:97:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/lib/cocoapods/command.rb:46:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.0/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
#
#  Be sure to run `pod spec lint Vanille.podspec' to ensure this is a
#  valid spec and to remove all comments including this before submitting the spec.
#
#  To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|

  # ―――  Spec Metadata  ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  These will help people to find your library, and whilst it
  #  can feel like a chore to fill in it's definitely to your advantage. The
  #  summary should be tweet-length, and the description more in depth.
  #

  s.name         = "Vanille"
  s.version      = "0.0.1"
  s.summary      = "A short description of Vanille."

  s.description  = <<-DESC
                   A longer description of Vanille in Markdown format.

                   * Think: Why did you write this? What is the focus? What does it do?
                   * CocoaPods will be using this to generate tags, and improve search results.
                   * Try to keep it short, snappy and to the point.
                   * Finally, don't worry about the indent, CocoaPods strips it!
                   DESC

  s.homepage     = "http://EXAMPLE/Vanille"
  # s.screenshots  = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"


  # ―――  Spec License  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Licensing your code is important. See http://choosealicense.com for more info.
  #  CocoaPods will detect a license file if there is a named LICENSE*
  #  Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
  #

  s.license      = "MIT (example)"
  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }


  # ――― Author Metadata  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Specify the authors of the library, with email addresses. Email addresses
  #  of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
  #  accepts just a name if you'd rather not provide an email address.
  #
  #  Specify a social_media_url where others can refer to, for example a twitter
  #  profile URL.
  #

  s.author             = { "" => "" }
  # Or just: s.author    = ""
  # s.authors            = { "" => "" }
  # s.social_media_url   = "http://twitter.com/"

  # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  If this Pod runs only on iOS or OS X, then specify the platform and
  #  the deployment target. You can optionally include the target after the platform.
  #

  # s.platform     = :ios
  s.platform     = :ios, "7.0"

  #  When using multiple platforms
  # s.ios.deployment_target = "5.0"
  # s.osx.deployment_target = "10.7"


  # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Specify the location from where the source should be retrieved.
  #  Supports git, hg, bzr, svn and HTTP.
  #

  s.source       = { :git => "http://EXAMPLE/Vanille.git", :tag => "0.0.1" }


  # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  CocoaPods is smart about how it includes source code. For source files
  #  giving a folder will include any h, m, mm, c & cpp files. For header
  #  files it will include any header in the folder.
  #  Not including the public_header_files will make all headers public.
  #

  s.source_files  = "Vanille", "Vanille/**/*.{h,m}"
  s.exclude_files = "Vanille/Exclude"

  s.public_header_files = "Vanille/**/*.h"


  # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  A list of resources included with the Pod. These are copied into the
  #  target bundle with a build phase script. Anything else will be cleaned.
  #  You can preserve files from being cleaned, please don't preserve
  #  non-essential files like tests, examples and documentation.
  #

  # s.resource  = "icon.png"
  # s.resources = "Resources/*.png"

  # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
  s.resources = "Vanille", "Vanille/**/*.{xcdatamodeld,xcdatamodel}" 
  s.preserve_paths = "Vanille/**/*./*.{xcdatamodeld,xcdatamodel}"


  # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  Link your library with frameworks, or libraries. Libraries do not include
  #  the lib prefix of their name.
  #

  # s.framework  = "SomeFramework"
  # s.frameworks = "SomeFramework", "AnotherFramework"
  s.framework  = "CoreData"
  s.framework  = "MapKit"
  s.framework  = "CoreLocation"
  # s.library   = "iconv"
  # s.libraries = "iconv", "xml2"


  # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
  #
  #  If your library depends on compiler flags you can set them in the xcconfig hash
  #  where they will only apply to your library. If you depend on other Podspecs
  #  you can include multiple dependencies to ensure it works.

  s.requires_arc = true

  # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
  # s.dependency "JSONKit", "~> 1.4"
  s.dependency 'AFNetworking', '~> 1.3.0'

end
@spitfire2903
Copy link

I'm having the same problem, the solution for me was downgrade cocoapods to 0.35, I didnt find any answers about this bug

@segiddins
Copy link
Member

This is a duplicate of #3091.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants