apple / swift-protobuf

Plugin and runtime library for using protobuf with Swift
Apache License 2.0
4.55k stars 445 forks source link

m1 SPM/CocoaPods #1244

Closed panviktor closed 1 year ago

panviktor commented 2 years ago

When I add the generated my.pb.swift file from my.proto, i make import SwiftProtobuf and my project stop buildings on simulator on M1 CPU with error:

Error: could not find module 'SwiftProtobuf' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator, at: /Users/viktor/Library/Developer/Xcode/DerivedData/CryptoWallet-fbwdqnqkhkqztadztepvckaicvmc/Build/Products/Debug-iphonesimulator/PackageFrameworks/SwiftProtobuf.framework/Modules/SwiftProtobuf.swiftmodule

Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64

I try both install options: SPM and CocaoPods.

thomasvl commented 2 years ago

You don't have a lot of details here, but it sounds like this isn't a problem with this project as much as it likely is in how your project is set up with either packaging system. Some how you seem to having it build for the wrong architecture. Maybe try making a small test case that shows the problem and others might be able to help you out by looking at that?

thomasvl commented 1 year ago

Closing this since there hasn't been other reports and no follow up here either.