Skip to content

Commit

Permalink
[CI] Resolve SwiftUI XCFramework compilation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple committed Jan 6, 2025
1 parent a1aab93 commit aef0d89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,20 @@ lane :build_xcframeworks do
)
sh('../Scripts/removeUnneededSymbols.sh', sdk, output_directory)
codesign << lane_context[SharedValues::XCFRAMEWORK_OUTPUT_PATH]
resolve_swiftui_xcframework_issue if sdk == 'StreamChatUI'
end
sh(codesign.join(' ')) # We need to sign all frameworks at once
end

desc 'https://linear.app/stream/issue/IOS-630'
private_lane :resolve_swiftui_xcframework_issue do
Dir.glob("#{lane_context[SharedValues::XCFRAMEWORK_OUTPUT_PATH]}/**/*.swiftinterface").each do |file|
old_text = File.read(file)
new_text = old_text.gsub(/SwiftUICore.View/, 'View')
File.open(file, 'w') { |f| f.puts(new_text) } if old_text != new_text
end
end

desc 'Start a new release'
lane :release do |options|
previous_version_number = last_git_tag
Expand Down

0 comments on commit aef0d89

Please sign in to comment.