Undefined symbol: type metadata for Swift._StringObject.Variant

While trying to build our project with Xcode 12 I ran into multiple build failures while rebuilding our dependencies with Carthage.

I always end up getting this linker error:


Undefined symbols for architecture armv7: "type metadata for Swift.StringObject.Variant", referenced from: outlined init with take of Swift.StringObject.Variant in CountryCodePickerViewController.o ld: symbol(s) not found for architecture armv7

This happened for me for both Alamofire and PhonenumerKit; therefore, this looks like an issue with the new Xcode and not the frameworks themselves. Archiving them with Xcode 11 works without a problem.

As an intermediate workaround I removed the armv7 architecture from the valid architectures.


I really hope this issue gets resolved soon. With Carthage we can use prebuild libraries with minimal affet to project compile time. Using Swift Package Manager we would dramatically increase our already long build times.
And still reproduces on Xcode 12 Beta 5 for me.
Undefined symbol: type metadata for Swift._StringObject.Variant
 
 
Q