XCode 15 workaround crashing on iOS 15 and earlier

In XCode 15, JUCE recommends adding the “-Wl,-ld_classic” linker flags to get around a broken binary issue on older Mac/iOS platforms. However, after doing so, I released an update to the App Store only to find any users running iOS 15 or earlier are crashing on startup. Looking through crash reports the crash is caused by the app trying to access the missing symbol UIWindowSceneGeometryPreferencesIOS. Looking at the Apple docs this was added in iOS 16 which explains the 15 or earlier crashing.

I uploaded a newer version using XCode 15.1 Beta and sent this to users via TestFlight and it fixed the crash. However, builds made with XCode Beta can’t be released to the App Store.

Is there another option besides “-Wl,-ld_classic” that would get me around this problem while still supporting users on iOS 15 and earlier?

If you’re building to support versions older than iOS 15 I’m not sure what else you could do. To be clear we only recommend this because Apple recommend it! We didn’t want users to discover runtime crashes which were likely to occur based on the know issues and our testing. See below for more details.

I’m not aware of any issue with runtime crashes caused by binaries built using Xcode 15 that shouldn’t be fixed by using the classic linker.

1 Like

I see. Ok, thanks for the clarification.

Aaaaaaand there was a typo in one of the linker flags (-d_classic instead of -ld_classic). :man_facepalming:t2:

:sweat_smile: