Skip to content

Commit

Permalink
Merge pull request soffes#153 from Keithbsmiley/master
Browse files Browse the repository at this point in the history
Updated podspec
  • Loading branch information
soffes committed Dec 22, 2012
2 parents 9c3b26a + 4e1f23c commit 0f0ad56
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion SSToolkit.podspec
Expand Up @@ -9,13 +9,26 @@ Pod::Spec.new do |s|
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 = 'Resources'
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

0 comments on commit 0f0ad56

Please sign in to comment.