Skip to content

Loading…

Alias namesake dummy class #20

Merged
merged 2 commits into from

2 participants

@blakewatters

No description provided.

@blakewatters

This is necessary for the podspec produced by the packager to actually be usable unless use a different name for the distribution package.

@neonichu neonichu merged commit 1f072e2 into master

1 check failed

Details continuous-integration/travis-ci The Travis CI build failed
@neonichu neonichu deleted the alias-namesake-dummy-class branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 9 additions and 4 deletions.
  1. +1 −1 lib/builder.rb
  2. +8 −3 lib/mangle.rb
View
2 lib/builder.rb
@@ -124,7 +124,7 @@ def expand_paths(path_specs)
end
def static_libs_in_sandbox(build_dir='build')
- Dir.glob("#{@sandbox_root}/#{build_dir}/*.a").reject { |e| e =~ /libPods\.a$/ }
+ Dir.glob("#{@sandbox_root}/#{build_dir}/libPods-*.a")
end
def xcodebuild(defines = '', args = '', build_dir = 'build')
View
11 lib/mangle.rb
@@ -12,15 +12,20 @@ def mangle_for_pod_dependencies(pod_name, sandbox_root)
|file| file !~ /#{pod_name}/
end
- all_syms = []
+ dummy_alias = alias_symbol "PodsDummy_Pods_#{pod_name}", pod_name
+ all_syms = [dummy_alias]
pod_libs.each do |pod_lib|
syms = Symbols.symbols_from_library(pod_lib)
- all_syms += syms.map! { |sym| sym + "=Pod#{pod_name}_" + sym }
+ all_syms += syms.map! { |sym| alias_symbol sym, pod_name }
end
"GCC_PREPROCESSOR_DEFINITIONS='${inherited} #{all_syms.uniq.join(' ')}'"
end
- module_function :mangle_for_pod_dependencies
+ def alias_symbol(sym, pod_name)
+ sym + "=Pod#{pod_name}_" + sym
+ end
+
+ module_function :mangle_for_pod_dependencies, :alias_symbol
end
Something went wrong with that request. Please try again.