Permalink
Browse files

Update ZBarSDK/1.3.1/ZBarSDK.podspec

Update ZBarSDK podspec so that it suppresses some annoying warnings.
Adds post install hook to delete PBXBuildFile entry of private headers.
Uses public_header_file option to separate public/private headers
  • Loading branch information...
1 parent cfc7eaf commit be25289a61486ba73a21ff97c48d1378619de9c9 @jinthagerman jinthagerman committed Jan 31, 2013
Showing with 20 additions and 0 deletions.
  1. +20 −0 ZBarSDK/1.3.1/ZBarSDK.podspec
@@ -20,6 +20,8 @@ Pod::Spec.new do |s|
'zbar/qrcode/*.c',
'iphone/*.m'
+ s.public_header_files = 'iphone/**/**/*.h', 'include/*.h'
+
s.header_mappings_dir = 'zbar'
s.frameworks = 'AVFoundation', 'CoreGraphics', 'CoreMedia', 'CoreVideo', 'QuartzCore'
@@ -31,4 +33,22 @@ Pod::Spec.new do |s|
"GCC_PREPROCESSOR_DEFINITIONS" => '$(inherited) NDEBUG=1' }
s.prefix_header_file = 'iphone/include/prefix.pch'
+
+ s.compiler_flags = '-w'
+
+ def s.post_install(target_installer)
+ project = target_installer.project
+ project.objects_by_uuid.each do |key, obj|
+ if obj.isa.to_s == "PBXBuildFile"
+ file_ref = obj.file_ref
+ if file_ref.isa.to_s == "PBXFileReference"
+ path = file_ref.pathname
+
+ if (path.extname.to_s == ".h" && path.dirname.to_s.include?("ZBarSDK/zbar"))
+ project.objects_by_uuid.delete(key)
+ end
+ end
+ end
+ end
+ end
end

0 comments on commit be25289

Please sign in to comment.