p2 / OAuth2

OAuth2 framework for macOS and iOS, written in Swift.
Other
1.14k stars 275 forks source link

Getting an error when building in a M1, using SPM and latest OAuth2 version available #419

Open pballada opened 3 months ago

pballada commented 3 months ago

Build failed because OAuth2.swiftmodule is missing a required architecture. Would you like to build for Rosetta instead?

Ensure all targets are configured to build for standard architectures. If your project uses external dependencies, contact those vendors to provide updated copies built to support all architectures.

You can control the visibility of architecture-specific run destinations in the Product > Destination menu.

ossus-lib commented 3 months ago

Can you paste the whole error? 5.3.5 seems build fine on M Macs.

pballada commented 3 months ago

These are the errors:

Screenshot 2024-04-22 at 16 37 21 Screenshot 2024-04-22 at 16 32 15

Followed Apple recommendations. https://developer.apple.com/documentation/technotes/tn3117-resolving-build-errors-for-apple-silicon

Right now I'm using Rosetta simulators for the moment to avoid the issue.

Will keep investigating, I also use cocoapods, so maybe it's related to that.

pballada commented 3 months ago

I think the problem it's related to SPM and not providing an xcframework, happened the same with another SPM repo. For now I went back to integrate your library with cocoapods, which prevents the error. (event I know it's unsupported).

Thanks!

ossus-lib commented 3 months ago

How are you building it? It works fine for me from Xcode for targets Mac and iOS, also from the Terminal with swift build.