Open
Description
[REQUIRED] Step 1: Describe your environment
- Xcode version:
12.3
- Firebase SDK version:
8.1.0
- Installation method:
Carthage
- Firebase Component:
FirebaseMLModelDownloader
[REQUIRED] Step 2: Describe the problem
- This PR added SwiftProtobuf as a dependency of
FirebaseMLModelDownloader
- The carthage distribution seems like it uses BUILD_LIBRARY_FOR_DISTRIBUTION=YES
- But the problem is that SwiftProtobuf does not support being built with BUILD_LIBRARY_FOR_DISTRIBUTION=YES. From the linked comment:
Swift Protobuf does not support itself being built in library evolution mode, so it cannot be present in the public ABI of any framework that is built in library evolution mode. That means it can only ever be imported @_implementationOnly, and its types can never be public.
I have other third parties in my app that depend on SwiftProtobuf
(grpc), so when using FirebaseMLModelDownloader
I am building my own SwiftProtobuf
xcframework using Carthage, and that uses BUILD_LIBRARY_FOR_DISTRIBUTION=NO
. When doing that, multiple link errors show up (Undefined symbols). See the following issue for an extensive description of the problem: apple/swift-protobuf#1101