Ld: Assertion failed: (aliasSectionNum == sectionNum && "alias and its target must be located in the same section")

I upgraded XCode to last version (15.3) in order to solve this warning:

ITMS-90725: SDK version issue - This app was built with the iOS 16.4 SDK. Starting April 29, 2024, all iOS and iPadOS apps must be built with the iOS 17 SDK or later, included in Xcode 15 or later, in order to be uploaded to App Store Connect or submitted for distribution.

Run on simulator works but If I try to build for production/app store I receive build error:

ld: Assertion failed: (aliasSectionNum == sectionNum && "alias and its target must be located in the same section"), function assignAliasAtomOffsetInSection, file Layout.cpp, line 3358.

I tried to add “-ld64” flag to “Other Linker Flags” as read on several posts but I can’t solve.

Could you please help me to solve the issue?

Thanks

Hello,

Even i’m getting the same error xcode 15. I tried with -ld_new, -ld_classic, -ld64 in Project target → Build settings → Linking - General → “Other linker flags” but nothing helped me out.

anyone’s help here is appreciatable!!!
Thanks,

Same here - I have a TestFlight build that expired that I just need to re-release, but I was getting the SDK Version Issue error since this build is a bit older. I tried to rebuild it with the 17 SDK, but now I’m getting this Assertion failed error (mine is also on line 3358, which makes me think this is an Xcode issue and not my app code).

Edit: I also tried adding -ld64 and -ld_classic under Other Linker Flags but to no avail.

Any help is appreciated, thanks!