-
Couldn't load subscription status.
- Fork 57
App Multicast Delegate #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…pp-delegate-sample
| return nil | ||
| } | ||
|
|
||
| if let multicastDelegate = appDelegate as? MulticastAppDelegateProtocol { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have not detected any issues with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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