Skip to content

Instantly share code, notes, and snippets.

@alloy
Forked from odrobnik/gist:5412380
Created April 18, 2013 12:52
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 alloy/5412471 to your computer and use it in GitHub Desktop.
Save alloy/5412471 to your computer and use it in GitHub Desktop.
Pod::Spec.new do |spec|
spec.name = 'DTLoupe'
spec.version = '1.3.0'
spec.platform = :ios, '4.3'
spec.license = 'COMMERCIAL'
spec.source = { :git => 'git@git.cocoanetics.com:parts/dtloupe.git', :tag => spec.version.to_s }
spec.source_files = 'Core/Source/*.{h,m}'
spec.frameworks = 'QuartzCore'
spec.requires_arc = true
spec.homepage = 'http://www.cocoanetics.com/parts/dtloupeview/'
spec.summary = 'A Loupe as used for text selection.'
spec.author = { 'Oliver Drobnik' => 'oliver@cocoanetics.com' }
spec.preserve_paths = 'DTLoupe.xcodeproj', 'Core/Resources'
spec.post_install do |library_representation|
# Get the config instance once, so that CP will only warn (about it being) deprecated once.
config = spec.config
puts "\nGenerating DTLoupe resources bundle\n".yellow if config.verbose?
Dir.chdir File.join(config.project_pods_root, 'DTLoupe') do
command = "xcodebuild -project DTLoupe.xcodeproj -target 'Resource Bundle' CONFIGURATION_BUILD_DIR=../Resources"
command << " 2>&1 > /dev/null" unless config.verbose?
unless system(command)
raise ::Pod::Informative, "Failed to generate DTLoupe resources bundle"
end
end
File.open(library_representation.copy_resources_script_path, 'a') do |file|
file.puts "install_resource 'Resources/DTLoupe.bundle'"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment