diff --git a/Gemfile.lock b/Gemfile.lock index 1b9f1ea..9c64b15 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,8 @@ PATH remote: . specs: - cocoapods-mangle (1.1.4) - cocoapods (~> 1.14) + cocoapods-mangle (1.1.5) + cocoapods (~> 1.15) GEM remote: https://rubygems.org/ @@ -21,10 +21,10 @@ GEM json (>= 1.5.1) atomos (0.1.3) claide (1.1.0) - cocoapods (1.14.3) + cocoapods (1.15.2) addressable (~> 2.8) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.14.3) + cocoapods-core (= 1.15.2) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 2.1, < 3.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -39,7 +39,7 @@ GEM nap (~> 1.0) ruby-macho (>= 2.3.0, < 3.0) xcodeproj (>= 1.23.0, < 2.0) - cocoapods-core (1.14.3) + cocoapods-core (1.15.2) activesupport (>= 5.0, < 8) addressable (~> 2.8) algoliasearch (~> 1.0) @@ -61,7 +61,7 @@ GEM coderay (1.1.3) colored2 (3.1.2) concurrent-ruby (1.2.3) - diff-lcs (1.4.4) + diff-lcs (1.5.1) escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) @@ -74,12 +74,12 @@ GEM concurrent-ruby (~> 1.0) json (2.7.1) method_source (1.0.0) - minitest (5.21.1) + minitest (5.22.2) molinillo (0.8.0) nanaimo (0.3.0) nap (1.1.0) netrc (0.11.0) - pry (0.13.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) pry-remote (0.1.8) @@ -87,20 +87,20 @@ GEM slop (~> 3.0) public_suffix (4.0.7) rexml (3.2.6) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.3) - rspec_junit_formatter (0.4.1) + rspec-support (~> 3.13.0) + rspec-support (3.13.0) + rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) ruby-macho (2.5.1) slop (3.6.0) @@ -108,7 +108,7 @@ GEM ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.23.0) + xcodeproj (1.24.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) diff --git a/cocoapods-mangle.gemspec b/cocoapods-mangle.gemspec index 5d62232..c9c519a 100644 --- a/cocoapods-mangle.gemspec +++ b/cocoapods-mangle.gemspec @@ -17,5 +17,5 @@ Gem::Specification.new do |spec| spec.test_files = Dir['spec/**/*.rb'] spec.extra_rdoc_files = ['README.md', 'CHANGELOG.md'] spec.require_paths = ['lib'] - spec.add_dependency 'cocoapods', '~> 1.14' + spec.add_dependency 'cocoapods', '~> 1.15' end diff --git a/lib/cocoapods_mangle/defines.rb b/lib/cocoapods_mangle/defines.rb index 7d1e8b6..aa9c862 100644 --- a/lib/cocoapods_mangle/defines.rb +++ b/lib/cocoapods_mangle/defines.rb @@ -125,9 +125,15 @@ def self.swift_symbol?(symbol) # Internal Swift symbols starting with __swift or ___swift such as should not be mangled # e.g. '00000000000050ac S ___swift_reflection_version' symbol[/ __(_)?swift/] || - # Internal Swift symbols starting with Swift such as should not be mangled - # e.g. 'Swift51Override' - symbol[/Swift/] || + # Internal Swift symbols starting with digit+Swift+optional_digit should not be mangled + # e.g. '34SwiftOverride', '34Swift570Override' + symbol[/\d+Swift(\d+)?/] || + # Internal Swift symbols starting with Swift+digit should not be mangled + # e.g. 'Swift570Override' + symbol[/Swift\d+/] || + # Internal SwiftUI symbols starting with digit+SwiftUI+optional_digit such as should not be mangled + # e.g. '55SwiftUI', '55SwiftUI45' + symbol[/\d+SwiftUI(\d+)?/] || # Swift symbols starting with symbolic should be ignored # e.g. '0000000000000248 S symbolic _____ 9ManglePod9SomeClassC' symbol[/symbolic /] || diff --git a/lib/cocoapods_mangle/gem_version.rb b/lib/cocoapods_mangle/gem_version.rb index ec5e267..cef9556 100644 --- a/lib/cocoapods_mangle/gem_version.rb +++ b/lib/cocoapods_mangle/gem_version.rb @@ -1,4 +1,4 @@ module CocoapodsMangle NAME = 'cocoapods-mangle' - VERSION = '1.1.4' + VERSION = '1.1.5' end diff --git a/spec/fixtures/symbols/all_defined_symbols.txt b/spec/fixtures/symbols/all_defined_symbols.txt index 9dab563..42acfd8 100644 --- a/spec/fixtures/symbols/all_defined_symbols.txt +++ b/spec/fixtures/symbols/all_defined_symbols.txt @@ -1208,9 +1208,15 @@ libManglePod.a(SomeFunc.o): 0000000000000000 S __swift_FORCE_LOAD_$_swiftCompatibility50_$_ManglePod 0000000000000008 S __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_ManglePod 0000000000000012 s l_llvm.swift_module_hash +0000000000000012 S someSwift50Overrides +0000000000000012 S someSwiftUI50Overrides libManglePod.a(SomeStruct.o): 0000000000000010 S ___swift_reflection_version 0000000000000000 S __swift_FORCE_LOAD_$_swiftCompatibility50_$_ManglePod 0000000000000008 S __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_ManglePod 0000000000000012 s l_llvm.swift_module_hash + +libManglePod.a(BrianSwiftAsyncIntegration.o): +0000000000000118 S _OBJC_CLASS_$_BrianSwiftAsyncIntegration +00000000000000f0 S _OBJC_METACLASS_$_BrianSwiftAsyncIntegration diff --git a/spec/fixtures/symbols/non_global_defined_symbols.txt b/spec/fixtures/symbols/non_global_defined_symbols.txt index 325a44b..ce9d85b 100644 --- a/spec/fixtures/symbols/non_global_defined_symbols.txt +++ b/spec/fixtures/symbols/non_global_defined_symbols.txt @@ -252,8 +252,14 @@ libManglePod.a(SomeFunc.o): 0000000000000010 S ___swift_reflection_version 0000000000000000 S __swift_FORCE_LOAD_$_swiftCompatibility50_$_ManglePod 0000000000000008 S __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_ManglePod +0000000000000012 S __swift_someSwift50Overrides +0000000000000012 S __swift_someSwiftUI50Overrides libManglePod.a(SomeStruct.o): 0000000000000010 S ___swift_reflection_version 0000000000000000 S __swift_FORCE_LOAD_$_swiftCompatibility50_$_ManglePod 0000000000000008 S __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_ManglePod + +libManglePod.a(BrianSwiftAsyncIntegration.o): +0000000000000118 S _OBJC_CLASS_$_BrianSwiftAsyncIntegration +00000000000000f0 S _OBJC_METACLASS_$_BrianSwiftAsyncIntegration diff --git a/spec/unit/defines_spec.rb b/spec/unit/defines_spec.rb index bad589b..b51877c 100644 --- a/spec/unit/defines_spec.rb +++ b/spec/unit/defines_spec.rb @@ -35,6 +35,7 @@ FLAnimatedImage FLWeakProxy FLAnimatedImageView + BrianSwiftAsyncIntegration ] end