Conversation
…pp-delegate-sample
| return nil | ||
| } | ||
|
|
||
| if let multicastDelegate = appDelegate as? MulticastAppDelegateProtocol { |
There was a problem hiding this comment.
This will likely never work in Swift, so the fallback below is the main code path.
| @@ -0,0 +1,153 @@ | |||
| // Copyright 2021 Google LLC | |||
There was a problem hiding this comment.
As nice as it would be, I don't think we can use Swift in libraries in Analytics dependency chain since SPM does not support Swift source libraries as dependencies of binary libs. See https://groups.google.com/a/google.com/g/google-ios-sdks/c/XsapHN-58Tk/m/dIEEnmpaAwAJ?utm_medium=email&utm_source=footer
There was a problem hiding this comment.
Ah, I didn't know about it. It's a bit disappointing. So far it looks like we can re-implement the multicast delegate in Objective-C though it will be more verbose and require Swift name annotations for some methods but which is still much easier to do comparing to the swizzling version. Thank you for the heads up!
There was a problem hiding this comment.
@paulb777 @maksymmalyhin IIRC, we had a discussion about whether this was possible or not but I forgot the outcome. Does SPM support Swift source libraries as dependencies of binary libs?
There was a problem hiding this comment.
We have not detected any issues with it.
There was a problem hiding this comment.
There is a problem with using Swift source dependencies from Swift binary pods, but we don't plan to have any Swift binary pods.
b/193554796