Skip to content

Building SwiftProtobuf with BUILD_LIBRARY_FOR_DISTRIBUTION=YES is not supported #8200

Open
@acecilia

Description

@acecilia

[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

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

Steps to reproduce:

See: apple/swift-protobuf#1101 (comment)

Metadata

Metadata

Assignees

Labels

Carthageapi: mlzipIssues related to binary distribution (zip file)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions