Skip to content

Commit c79faad

Browse files
[CI] Remove all the SwiftUICore module shadows in xcframeworks (#789)
1 parent 960f831 commit c79faad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

fastlane/Fastfile

+11
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,21 @@ lane :build_xcframeworks do
5050
codesign << lane_context[SharedValues::XCFRAMEWORK_OUTPUT_PATH]
5151
end
5252

53+
remove_swiftui_core_module_shadow(output_directory: output_directory)
5354
remove_stream_chat_module_shadow(output_directory: output_directory)
5455
sh(codesign.join(' ')) # We need to sign all frameworks at once
5556
end
5657

58+
# https://linear.app/stream/issue/IOS-630
59+
private_lane :remove_swiftui_core_module_shadow do |options|
60+
Dir.glob("#{options[:output_directory]}/**/*.swiftinterface").each do |file|
61+
if File.file?(file)
62+
UI.important("Removing the SwiftUICore module's shadow at: #{file}...")
63+
File.write(file, File.read(file).gsub('SwiftUICore.', ''))
64+
end
65+
end
66+
end
67+
5768
# Swift emits an invalid module interface when a public type has the same name as a module, see https://github.com/swiftlang/swift/issues/56573
5869
private_lane :remove_stream_chat_module_shadow do |options|
5970
Dir.glob("#{options[:output_directory]}/**/*.swiftinterface") do |file|

0 commit comments

Comments
 (0)