Getting error after editing a podspec #644

Closed
hartbit opened this Issue Nov 12, 2012 · 4 comments

Comments

Projects
None yet
3 participants

hartbit commented Nov 12, 2012

I'm getting a different prefix error when installing a pod that references a podspec that I tried to modify. I'm not an expert in Ruby, but the code I modified in cocos2d.podspec seems ok. I ran it through IRB without any trouble.

Podspec

Pod::Spec.new do |s|
  s.name        =  'cocos2d'
  s.license     =  'MIT'
  s.version     =  '2.0.0'
  s.summary     =  'cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications.'
  s.description =  'cocos2d for iPhone is a framework for building 2D games, demos, and other graphical/interactive applications for iPod Touch, iPhone, iPad and Mac. It is based on the cocos2d design but instead of using python it, uses objective-c.'
  s.homepage    =  'http://www.cocos2d-iphone.org'
  s.author      =  { 'Ricardo Quesada' => 'ricardoquesada@gmail.com', 'Zynga Inc.' => 'https://zynga.com/' }
  s.source      =  {:git => 'https://github.com/cocos2d/cocos2d-iphone.git', :tag => 'release-2.0'}

  common_sources = FileList['cocos2d/**/*.{h,m,c}'].exclude(/Platforms\/.+\//) +
                   FileList['external/libpng/*.{h,c}'].exclude(/pngtest/) +
                   ['external/kazmath/src/**/*.{c,h}', 'external/kazmath/include/**/*.{c,h}']
  s.osx.source_files = common_sources + ['cocos2d/Platforms/Mac/*.{h,m}']
  s.ios.source_files = common_sources + ['cocos2d/Platforms/iOS/*.{h,m}']
  s.xcconfig   =  { 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/cocos2d/external/kazmath/include"' }
  s.frameworks =  ["OpenGLES", "QuartzCore", "GameKit"]
  s.library    =  'z'

  s.subspec 'CocosDenshion' do |p|
    common_sources2 = ['CocosDenshion/CocosDenshion/*.{h,m}', 'CocosDenshion/CocosDenshionExtras/CDXPropertyModifierAction.{h,m}']
    p.ios.source_files = common_sources2
    p.osx.source_files = common_sources2 + ['CocosDenshion/CocosDenshionExtras/CDXMacOSXSupport.{h,m}']
    p.frameworks   =  ["OpenAL", "AVFoundation", "AudioToolbox"]
  end

  s.prefix_header_contents = '''
#define CC_ENABLE_GL_STATE_CACHE 1
'''

  def s.copy_header_mapping(from)
    from.relative_path_from(Pathname.new('cocos2d'))
  end
end

Podfile

platform :ios, '5.0'

pod 'BlocksKit'
pod 'cocos2d', '2.0.0'
pod 'TestFlightSDK'
pod 'JRSwizzle'
pod 'InAppSettingsKit'

inhibit_all_warnings!

Error

different prefix: "" and "/Users/david/Dropbox/Projects/GraviMaze/Pods"
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb:730:in `relative_path_from'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/local_pod.rb:209:in `relativize_from_sandbox'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/local_pod.rb:229:in `relative_source_files_by_spec'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/local_pod.rb:229:in `map'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/local_pod.rb:229:in `relative_source_files_by_spec'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/local_pod.rb:228:in `each'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/local_pod.rb:228:in `relative_source_files_by_spec'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/local_pod.rb:405:in `add_file_references_to_project'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/installer.rb:22:in `project'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/installer.rb:22:in `each'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/installer.rb:22:in `project'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/installer.rb:118:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/user_interface.rb:77:in `message'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/installer.rb:117:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/user_interface.rb:37:in `section'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/installer.rb:112:in `install!'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/command/install.rb:46:in `run_install_with_update'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/command/update.rb:24:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/lib/cocoapods/command.rb:75:in `run'
/Library/Ruby/Gems/1.8/gems/cocoapods-0.16.0.rc3/bin/pod:16
/usr/bin/pod:23:in `load'
/usr/bin/pod:23

hartbit commented Nov 15, 2012

@irrationalfab Perhaps you can give me a hand with this, as you are the original author of the podspec. Pretty please? :) The reason I am modifying your original podpsec is that it generates a duplicate file warning because it compiles both Mac/CCGLView.h and iOS/CCGLView.h. I'm trying to tell it to exclude Mac sources when on iOS and vice-versa.

Owner

fabiopelosin commented Apr 2, 2013

Sorry man, I totally missed this one. Is it still relevant or can we close the issue?

Owner

fabiopelosin commented Apr 9, 2013

Closing as outdated.

when I use "pod trunk registe". error
fc8bd65c-13e1-4511-9087-25c1b1a7c809

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