Skip to content

Conversation

@maksymmalyhin
Copy link
Contributor

@maksymmalyhin maksymmalyhin commented Jul 21, 2021

b/193554796

return nil
}

if let multicastDelegate = appDelegate as? MulticastAppDelegateProtocol {
Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Contributor Author

@maksymmalyhin maksymmalyhin Jul 21, 2021

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!

Copy link
Member

@ncooke3 ncooke3 Oct 1, 2021

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants