Skip to content

Commit

Permalink
Update podspec and add custom module map to fix umbrella header inclu…
Browse files Browse the repository at this point in the history
…ding C++ symbols, which broke Swift builds.
  • Loading branch information
CooperCorona committed May 9, 2023
1 parent 0d5be25 commit d4c9fb8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
6 changes: 6 additions & 0 deletions GTXiLib.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module GTXiLib {
umbrella header "GTXiLib.h"

export *
module * { export * }
}
28 changes: 17 additions & 11 deletions GTXiLib.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "GTXiLib"
s.version = "5.0"
s.version = "5.1"
s.summary = "iOS Accessibility testing library."
s.description = <<-DESC
iOS Accessibility testing library that works with XCTest based frameworks.
Expand All @@ -9,21 +9,27 @@ Pod::Spec.new do |s|
s.license = "Apache License 2.0"
s.author = "j-sid"
s.platform = :ios
s.source = { :git => "https://github.com/google/GTXiLib.git", :tag => "5.0.0" }
s.source = { :git => "https://github.com/google/GTXiLib.git", :tag => "5.1.0" }
# Manually specify modulemap to use a custom umbrella header. CocoaPods' default
# umbrella header includes public headers from GTXOOPLib, which include C++ symbols.
# Swift uses the umbrella header for Obj-C interop, but C++ symbols cause compilation errors.
s.module_map = "GTXiLib.modulemap"
s.subspec "GTXiLib" do |sp|
sp.source_files = "{Classes,OOPClasses}/**/*.{h,m,swift,mm,cc}"
sp.public_header_files = "{Classes,OOPClasses}/**/*.h"
sp.private_header_files = [
"Classes/GTXImageRGBAData+GTXOOPAdditions.h",
"Classes/GTXToolKit+GTXOOPAdditions.h",
"Classes/NSObject+GTXAdditions.h",
"Classes/NSString+GTXAdditions.h",
"Classes/UIColor+GTXOOPAdditions.h"
]
sp.source_files = "Classes/**/*.{h,m,mm}"
sp.public_header_files = "Classes/**/*.h"
sp.private_header_files = "Classes/ObjCPP/*.h"
sp.exclude_files = ["Classes/XCTest/*.{h,m,mm}"]
sp.resources = ["ios_translations.bundle"]
sp.ios.deployment_target = "9.0"
sp.ios.framework = "Vision"
sp.dependency "GTXiLib/GTXOOPLib"
end
s.subspec "GTXOOPLib" do |sp|
sp.source_files = "OOPClasses/**/*.{h,cc}"
sp.public_header_files = "OOPClasses/**/*.h"
sp.resources = ["ios_translations.bundle"]
sp.ios.deployment_target = "9.0"
sp.ios.framework = "Vision"
sp.libraries = "c++"
sp.dependency "abseil"
sp.dependency "tinyxml"
Expand Down

0 comments on commit d4c9fb8

Please sign in to comment.