Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly add Swift Protobuf to the project as XCFramework? #1348

Closed
pwittchen opened this issue Nov 22, 2022 · 2 comments
Closed

How to properly add Swift Protobuf to the project as XCFramework? #1348

pwittchen opened this issue Nov 22, 2022 · 2 comments

Comments

@pwittchen
Copy link

Hi,

I read discussion in the issue #1101 which is related to this issue, but it's still unresolved.
I'm struggling to add Swift Protobuf dependency as XCFramework to the project. I'm providing custom library to the clients, which uses Swift Protobuf under the hood, but not all clients are allowed to use Cocoa Pods or Swift PM due to some corporate/security restrictions. That's why I want to provide Swift Protobuf as XCFramework besides my library.

I crated Swift Protobuf as XCFramework with Carthage and client got the following errors:

Symbol not found: _$s13SwiftProtobuf19_ProtoNameProvidingP17_protobuf_nameMapAA01_dH0VvgZTq

  Referenced from: /Users/.../Library/Developer/Xcode/DerivedData/app-fjxtxghupzrzaqgmblomcfbryxpp/Build/Products/UAT-iphonesimulator/iOS_SDK.framework/iOS_SDK

  Expected in: /Users/.../Library/Developer/Xcode/DerivedData/app-fjxtxghupzrzaqgmblomcfbryxpp/Build/Products/UAT-iphonesimulator/SwiftProtobuf.framework/SwiftProtobuf

Can you please give me some suggestions, how can I properly create Swift Protobuf as XCFramework, so I can provide it to the clients and they won't get any errors?

Regards,
Piotr

@Lukasa
Copy link
Contributor

Lukasa commented Nov 22, 2022

Swift Protobuf doesn't provide a stable ABI, so generally speaking you cannot offer it to clients in the form of an XCFramework. You would need to conceal your use of Swift Protobuf, importing it as @_implementationOnly.

@Lukasa
Copy link
Contributor

Lukasa commented Nov 22, 2022

As this is fundamentally the same issue as #1101, I'm going to close this issue to centralise conversation there.

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

No branches or pull requests

2 participants