File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
lib/cocoapods-binary/rome Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,29 @@ def build_for_iosish_platform(sandbox,
53
53
FileUtils . cp_r simulator_swiftmodule_path + "/." , device_swiftmodule_path
54
54
end
55
55
56
+ # combine the generated swift headers
57
+ # (In xcode 10.2, the generated swift headers vary for each archs)
58
+ # https://github.com/leavez/cocoapods-binary/issues/58
59
+ simulator_generated_swift_header_path = simulator_framework_path + "/Headers/#{ module_name } -Swift.h"
60
+ device_generated_swift_header_path = device_framework_path + "/Headers/#{ module_name } -Swift.h"
61
+ if File . exist? simulator_generated_swift_header_path
62
+ device_header = File . read ( device_generated_swift_header_path )
63
+ simulator_header = File . read ( simulator_generated_swift_header_path )
64
+ # https://github.com/Carthage/Carthage/issues/2718#issuecomment-473870461
65
+ combined_header_content = %Q{
66
+ #if TARGET_OS_SIMULATOR // merged by cocoapods-binary
67
+
68
+ #{ simulator_header }
69
+
70
+ #else // merged by cocoapods-binary
71
+
72
+ #{ device_header }
73
+
74
+ #endif // merged by cocoapods-binary
75
+ }
76
+ File . write ( device_generated_swift_header_path , combined_header_content . strip )
77
+ end
78
+
56
79
# handle the dSYM files
57
80
device_dsym = "#{ device_framework_path } .dSYM"
58
81
if File . exist? device_dsym
You can’t perform that action at this time.
0 commit comments