Currently, I have an issue with one of the libs that I use in the project, it simply won't let me make the build for the iOS simulator.
Getting the following error message: Building for iOS Simulator, but the linked library '!@#$%^&.a' was built for iOS.
In my class I have the following code:
#if (TARGET_IPHONE_SIMULATOR==0)
void !@#$%^&_init(void);
#endif
I have tried to exclude the file when building the app for the iPhone simulator by adding it in Build Settings > Build Options > Excluded Source File Names > Any iOS Simulator SDK
I have also tried to exclude the following architectures: arm64, arm64e, and armv7.
Setting Build Active Architecture Only to YES, didn't do the trick for me, nor validating build product nor validate workspace.
Actually, none of the above-mentioned solutions worked for me, so I had to ask this question here.
As a workaround you should be able to change Build system to "Legacy Build System" under File/Project Settings. The proper solution would be to package your library as XCFramework.