Skip to content

Commit 5e6f333

Browse files
committed
fix: swift 6.0 compat issues
1 parent bbb2dd8 commit 5e6f333

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/macos/Podfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,19 @@ post_install do |installer|
4848
end
4949
end
5050
end
51+
52+
# Fix Swift 6.0 'sending' keyword compatibility issues
53+
firebase_encoder_file = 'Pods/FirebaseSharedSwift/FirebaseSharedSwift/Sources/third_party/FirebaseDataEncoder/FirebaseDataEncoder.swift'
54+
if File.exist?(firebase_encoder_file)
55+
text = File.read(firebase_encoder_file)
56+
new_contents = text.gsub('throws -> sending Any', 'throws -> Any')
57+
File.open(firebase_encoder_file, "w") { |file| file.puts new_contents }
58+
end
59+
60+
firebase_lock_file = 'Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/Utilities/FIRAllocatedUnfairLock.swift'
61+
if File.exist?(firebase_lock_file)
62+
text = File.read(firebase_lock_file)
63+
new_contents = text.gsub('initialState: sending State', 'initialState: State')
64+
File.open(firebase_lock_file, "w") { |file| file.puts new_contents }
65+
end
5166
end

0 commit comments

Comments
 (0)