Skip to content

Commit

Permalink
Update 1.0.2 SSToolkit spec.
Browse files Browse the repository at this point in the history
Looks like someone else added this. I have just created the 1.0.2 tag, so it was probably failing before.
  • Loading branch information
soffes committed Dec 31, 2012
1 parent e5373ef commit d79f806
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions SSToolkit/1.0.2/SSToolkit.podspec
@@ -1,23 +1,34 @@
Pod::Spec.new do |s|
s.name = 'SSToolkit'
s.version = '1.0.2'
s.platform = :ios
s.summary = 'A collection of well-documented iOS classes for making life easier.'
s.homepage = 'http://sstoolk.it'
s.author = { 'Sam Soffes' => 'sam@samsoff.es' }
s.license = 'MIT'
s.source = { :git => 'https://github.com/fictorial/sstoolkit.git', :tag => '1.0.2' }

s.name = 'SSToolkit'
s.version = '1.0.2'
s.platform = :ios
s.summary = 'A collection of well-documented iOS classes for making life easier.'
s.homepage = 'http://sstoolk.it'
s.author = { 'Sam Soffes' => 'sam@soff.es' }
s.source = { :git => 'https://github.com/soffes/sstoolkit.git', :tag => '1.0.2' }
s.description = 'SSToolkit is a collection of well-documented iOS classes for making life ' \
'easier by solving common problems all iOS developers face. Some really ' \
'handy classes are SSCollectionView, SSGradientView, SSSwitch, and many more.'

s.resources = 'Assets'
s.source_files = 'SSToolkit/**/*.{h,m}'
s.frameworks = 'QuartzCore', 'CoreGraphics'
s.requires_arc = true
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.preserve_paths = 'SSToolkit.xcodeproj', 'Resources'

def s.post_install(target)
puts "\nGenerating SSToolkit resources bundle\n".yellow if config.verbose?
Dir.chdir File.join(config.project_pods_root, 'SSToolkit') do
command = "xcodebuild -project SSToolkit.xcodeproj -target SSToolkitResources CONFIGURATION_BUILD_DIR=../Resources"
command << " 2>&1 > /dev/null" unless config.verbose?
unless system(command)
raise ::Pod::Informative, "Failed to generate SSToolkit resources bundle"
end

File.open(File.join(config.project_pods_root, target.target_definition.copy_resources_script_name), 'a') do |file|
file.puts "install_resource 'Resources/SSToolkitResources.bundle'"
end
end

prefix_header = config.project_pods_root + target.prefix_header_filename
prefix_header.open('a') do |file|
file.puts(%{#ifdef __OBJC__\n#import "SSToolkitDefines.h"\n#endif})
Expand Down

12 comments on commit d79f806

@cabbiepete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the update to this spec I can no longer install it. It fails on the post_install resources build saying

xcodebuild: error: 'SSToolkit.xcodeproj' does not exist.
[!] Failed to generate SSToolkit resources bundle

Any ideas?

@keith
Copy link
Member

@keith keith commented on d79f806 Jan 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try cleaning out your ~/Library/Caches/CocoaPods folder and try to run pod install --verbose again and toss the output in here.

@cabbiepete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaned out as above then ran with --verbose here's the output (there's more above that succeeded but seems irrelevant let me know if its useful). Interestingly the only thing added to ~/Library/Caches/CocoaPods folder is a Git/7f8089a4... folder which is a repo for another pod I am using. I.e. the git repo for SSToolKit isn't in there which would explain why SSToolKit.xcodeproj isn't found but not as to why it isn't downloaded.

Generating SSToolkit resources bundle

Build settings from command line:
    CONFIGURATION_BUILD_DIR = ../Resources

xcodebuild: error: 'SSToolkit.xcodeproj' does not exist.
[!] Failed to generate SSToolkit resources bundle

/Users/cabbiepete/.cocoapods/master/SSToolkit/1.0.2/SSToolkit.podspec:24:in `block in post_install'
/Users/cabbiepete/.cocoapods/master/SSToolkit/1.0.2/SSToolkit.podspec:20:in `chdir'
/Users/cabbiepete/.cocoapods/master/SSToolkit/1.0.2/SSToolkit.podspec:20:in `post_install'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:157:in `block (2 levels) in run_post_install_hooks'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:156:in `each'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:156:in `block in run_post_install_hooks'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:155:in `each'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:155:in `run_post_install_hooks'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:127:in `block (2 levels) in install!'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/user_interface.rb:77:in `message'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:125:in `block in install!'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/user_interface.rb:37:in `section'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/installer.rb:112:in `install!'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/command/install.rb:46:in `run_install_with_update'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/command/install.rb:51:in `run'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/lib/cocoapods/command.rb:75:in `run'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/gems/cocoapods-0.16.1/bin/pod:16:in `<top (required)>'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/bin/pod:19:in `load'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/bin/pod:19:in `<main>'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
/Users/cabbiepete/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'

@cabbiepete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I revert the podspec back to before this commit it works fine (although that's expected I guess).

@keith
Copy link
Member

@keith keith commented on d79f806 Jan 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's in the yourproject/Pods/SSToolkit folder?

@cabbiepete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pwd
~/myproject/Pods/SSToolkit
➜ SSToolkit git:(develop) ✗ ls -la
total 24
drwxr-xr-x 7 cabbiepete staff 238 3 Sep 14:47 .
drwxr-xr-x 22 cabbiepete staff 748 18 Jan 11:46 ..
drwxr-xr-x 20 cabbiepete staff 680 3 Sep 14:47 Assets
-rw-r--r-- 1 cabbiepete staff 1059 3 Sep 14:47 LICENSE
-rw-r--r-- 1 cabbiepete staff 1886 3 Sep 14:47 Readme.markdown
drwxr-xr-x 104 cabbiepete staff 3536 3 Sep 14:47 SSToolkit
-rw-r--r-- 1 cabbiepete staff 1023 3 Sep 14:47 SSToolkit.podspec

@keith
Copy link
Member

@keith keith commented on d79f806 Jan 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIX

Ok so the issue is that you still have files from the old spec that pointed to this repo instead of Sam's. You can tell because you have the Assets folder instead of Resources (IMO this shouldn't have been merged).

You should be able to fix it by removing the pod 'SSToolkit' ... from your Podfile run pod install so it cleans up all the old SSToolkit stuff, add it back to your podfile and install again. That should clean up all the crap. (You may want to clean out that Caches folder again in-between)

@cabbiepete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep that fixed it. And IMO I agree another version would have been much better i.e. 1.0.3 I really didn't expect something to change when I changed nothing. Anyways issue and fix documented here for others now thanks for your help.

@keith
Copy link
Member

@keith keith commented on d79f806 Jan 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Let us know if you need anything else!

@soffes
Copy link
Contributor Author

@soffes soffes commented on d79f806 Jan 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do need anything from me?

@cabbiepete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so all sorted. Hopefully not too many others have the same issue but if they do hopefully they find this. Thanks again for the toolkit :-).

@keith
Copy link
Member

@keith keith commented on d79f806 Jan 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soffes the issue is that the fork that used to be 1.0.2 changed the Resources folder to Assets (apparently to fix some simulator) issue and it had to be cleaned about because yours was looking for resources instead.

Please sign in to comment.