module Pod class Podfile if Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0') # Calls the post install callback if defined. # # @param [Pod::Installer] installer # the installer that is performing the installation. # # @return [Bool] whether a post install callback was specified and it was # called. # # This allows the user to customize, for instance, the generated Xcode project _before_ it’s written to disk. alias_method :old_post_install!, :post_install! def post_install!(installer) executed = old_post_install!(installer) handle_pods_project_configurations!(installer) unless executed executed end def handle_pods_project_configurations!(installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings["BUILD_LIBRARY_FOR_DISTRIBUTION"] = "YES" config.build_settings["CODE_SIGN_IDENTITY"] = "" if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" end end end end end end