YYImage icon indicating copy to clipboard operation
YYImage copied to clipboard

Problems using lib in simulator

Open rafagan opened this issue 3 years ago • 4 comments

The library is presenting the following issue when build for iOS simulator:

In <...>/Pods/YYImage/Vendor/WebP.framework/WebP(libwebpencode_la-config.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

Any help?

rafagan avatar Sep 22 '21 17:09 rafagan

Hi there, we're having the same issue, with manual installation as we manage dependencies through Carthage:

[omitted]/Vendor/WebP.framework/WebP(libwebpencode_la-config.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

This apparently only happens when building in Release configuration for a simulator destination. It does not happen in the remaining three cases (Debug for simulator and bot Release/Debug for device).

Did you have any luck in solving the issue?
Thanks

GiuseppePiscopo avatar Oct 15 '21 09:10 GiuseppePiscopo

No, I don't. For now I'm using only real devices. I think this library wasn't configured for x86_64 architectures

rafagan avatar Oct 16 '21 02:10 rafagan

Thanks for reply. In the meantime we found the issue. There are a couple of workarounds (not definitive solutions, I mean). You can find more details in a (quite dense) Stack Overflow page: https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-an-object-file-built-for-io/

I'd suggest to especially read the current second answer for an understanding of the issue: https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-an-object-file-built-for-io/64139830#64139830

The two workarounds are the one related to ONLY_ACTIVE_ARCH and the one related to EXCLUDED_ARCHS.
HTH

GiuseppePiscopo avatar Oct 18 '21 09:10 GiuseppePiscopo

@rafagan you might want to consider closing the issue, if that's the case. Regards

GiuseppePiscopo avatar Nov 30 '21 15:11 GiuseppePiscopo