diff --git a/lib/builder.rb b/lib/builder.rb index b68fe20..050d2e1 100644 --- a/lib/builder.rb +++ b/lib/builder.rb @@ -73,22 +73,22 @@ def build_static_lib_for_mac(static_libs, output) `libtool -static -o #{output} #{static_libs.join(' ')}` end - def build_with_mangling(defines) + def build_with_mangling UI.puts 'Mangling symbols' - defines = Symbols.mangle_for_pod_dependencies(@spec.name, @sandbox_root) - UI.puts 'Building mangled framework' - xcodebuild(defines) + Symbols.mangle_for_pod_dependencies(@spec.name, @sandbox_root).tap do |defines| + UI.puts 'Building mangled framework' + xcodebuild(defines) + end end def compile - if @spec.dependencies.count > 0 && @mangle + if @spec.dependencies.count > 0 #&& @mangle + xcodebuild + build_with_mangling + else xcodebuild - build_with_mangling(defines) - defines + nil end - - xcodebuild - nil end def copy_headers