Hi,
My SwiftUI app uses a third-party framework (written in objc, say with name Foo
) that is built into a XCFramework. I can build and run this app in iOS simulator and an iPhone connected to my Mac. But when I do "Product" -> "Archive", it fails with the error:
Cannot find 'Foo' in scope
The error is reported at anywhere that uses things like Foo.bar()
.
Why would Archive fail while both simulator and real device works with the framework? What's the extra thing does Archive do?
XCode version: 14.2
Target setting -> General -> Frameworks, Libraries and Embedded Content: "Embed & Sign".
Thanks.