Open cjwirth opened 2 months ago
@cjwirth do you have any solution for this scenario as a workaround?
Unfortunately the only thing that has worked for me is to keep it in CocoaPods and not use the Package.
The only things I have issues with and need to use CocoaPods for are related to Google lol. Everything else has been fine.
Another workaround that I've had to do (for a different library, but another one made by Google, lol) is to abstract it out so that only the top-level app target is the one that links the library.
So let's say you have OnboardingFramework and LoginFramework, and they both depend on GoogleSignIn. Instead, rework OnboardingFramework and LoginFramework so that they don't link and import GoogleSignIn. You'll give them their own protocols for the methods that you need to call from GoogleSignIn. Then in your top-level app target, you'll create implementations of the protocols you made, passing them into the frameworks when you need it.
Yes it's boilerplate, but it works.
Describe the bug When building the app, I get undefined symbol errors, saying that it can't find symbols that exist in AppAuthCore:
This only happens if GoogleSignIn is added as a dependency of multiple targets that end up in the resulting app. If GoogleSignIn is only included into one target, it seems to be OK. But when it's included in multiple targets, I get the error above.
I have created a reproducible sample using the ObjC sample app provided by this repo.
To Reproduce Steps to reproduce the behavior:
Or checkout the reproducible sample that I put together and try building it.
The app is basically structured like this in terms of project and dependencies:
Expected behavior The app should build.
Screenshots [available on request, but really nothing worth sharing, I don't think?]
Environment