When I build and run the app all is working ok. When I try to use the SwiftUI Preview Canvas XCode raises me errors.
Swift package target 'GoogleUtilities_Environment' is linked as a static library by 'ioniCup (iOS)' and 4 other targets. This will result in duplication of library code.
Swift package target 'GoogleUtilities_Logger' is linked as a static library by 'ioniCup (iOS)' and 4 other targets. This will result in duplication of library code.
md5-ff2f6b34ba89c546d876990a2a9b9e0c
Swift package target 'FirebaseStorage' is linked as a static library by 'ioniCup (iOS)' and 'FirebaseStorageSwift'. This will result in duplication of library code.
md5-ff2f6b34ba89c546d876990a2a9b9e0c
Swift package target 'FirebaseFirestore' is linked as a static library by 'ioniCup (iOS)' and 'FirebaseFirestore'. This will result in duplication of library code.
md5-ff2f6b34ba89c546d876990a2a9b9e0c
Swift package target 'FirebaseCore' is linked as a static library by 'ioniCup (iOS)' and 4 other targets. This will result in duplication of library code.
@lorenzofiamingo Thanks for trying out the Swift Package Manager support and the feedback. This looks like a known Xcode issue described at https://forums.swift.org/t/swift-packages-in-multiple-targets-results-in-this-will-result-in-duplication-of-library-code-errors/34892/38:
There is an entirely separate issue which happens only for Xcode previews which is related to all package products being built dynamically in Xcode 12 to enable previews. It is also something we're actively investigating. There is no workaround for this, since users do not have control over how builds for preview are being done.
Might be fixed in Xcode 12 beta 5 - https://forums.swift.org/t/swift-packages-in-multiple-targets-results-in-this-will-result-in-duplication-of-library-code-errors/34892/40.
I'll plan to retry in the next day or two - but feel free to beat me to it. :)
Confirmed that Xcode 12 beta 5 fixes Swift UI preview for all Firebase products except Firestore.
It exposes a build issue in its abseil dependency for which I'll send a PR for.